PGP critical issue when trying to install mysql2 in rails project
<p>I'm trying to install all the gems for a Rails project locally. </p>
<p>I have a problem with mysql2. When I try to install it I get the following error: </p>
<pre class="brush:php;toolbar:false;">Fetching mysql2-0.5.5.gem
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-x86_64-libmariadbclient
error: mingw32: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" could not be looked up remotely
error: mingw64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" could not be looked up remotely
error: msys: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" could not be looked up remotely
error: database 'mingw32' is not valid (invalid or corrupted database (PGP signature))
error: database 'mingw64' is not valid (invalid or corrupted database (PGP signature))
error: database 'msys' is not valid (invalid or corrupted database (PGP signature))
pacman failed with the following output:
Building native extensions with: '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 8.0\lib" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 8.0\include"'
This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.</pre>
<p>Then I tried running <code>pacman -Syu</code> but I got the same error and was not asked to import the PGP key. </p>
<p>So I tried manually importing the key based on pacman-key --add </code> from the MSI keyring GitHub. I then changed the trust to Ultimate using <code>pacman-key --edit-key</code>.</p>
<p>But now, I'm getting another error: </p>
<pre class="brush:php;toolbar:false;">Installing required msys2 packages: mingw-w64-x86_64-libmariadbclient
error: could not open file /var/lib/pacman/sync/mingw32.db: Child process exited with status 127
error: could not open file /var/lib/pacman/sync/mingw64.db: Child process exited with status 127
error: could not open file /var/lib/pacman/sync/msys.db: Child process exited with status 127
error: target not found: mingw-w64-x86_64-libmariadbclient
pacman failed with the following output:
Building native extensions with: '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 8.0\lib" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 8.0\include"'
This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.</pre>
<p>I don't know if I'm adding the wrong key this way, or if the error comes from something else. I've been struggling with this for a few days now and I'm a little lost. Can anyone help? </p>