Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 安装sqlite3公钥环时出错,未找到_Ruby On Rails_Sqlite - Fatal编程技术网

Ruby on rails 安装sqlite3公钥环时出错,未找到

Ruby on rails 安装sqlite3公钥环时出错,未找到,ruby-on-rails,sqlite,Ruby On Rails,Sqlite,怎么了?如何安装它 PS C:\Users\luism>gem安装sqlite3 暂时增强MSYS/MINGW的路径。。。 安装所需的msys2软件包:mingw-w64-x86_64-sqlite3 警告:未找到公钥环;你运行过“pacman密钥--init”吗? 错误:mingw32:键“AD351C50AE085775EB59333B5F92EFC1A47D45A1”未知 错误:密钥环不可写 错误:mingw64:键“AD351C50AE085775EB59333B5F92EFC1A47D

怎么了?如何安装它

PS C:\Users\luism>gem安装sqlite3 暂时增强MSYS/MINGW的路径。。。 安装所需的msys2软件包:mingw-w64-x86_64-sqlite3 警告:未找到公钥环;你运行过“pacman密钥--init”吗? 错误:mingw32:键“AD351C50AE085775EB59333B5F92EFC1A47D45A1”未知 错误:密钥环不可写 错误:mingw64:键“AD351C50AE085775EB59333B5F92EFC1A47D45A1”未知 错误:密钥环不可写 错误:msys:键“AD351C50AE085775EB59333B5F92EFC1A47D45A1”未知 错误:密钥环不可写 错误:数据库“mingw32”无效(无效或损坏的数据库(PGP签名)) 错误:数据库“mingw64”无效(无效或损坏的数据库(PGP签名)) 错误:数据库“msys”无效(无效或损坏的数据库(PGP签名)) pacman失败,输出如下: 构建本机扩展。这可能需要一段时间。。。 错误:安装sqlite3时出错: 错误:无法生成gem本机扩展

current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2/ext/sqlite3
C:/Ruby26-x64/bin/ruby.exe-ic:/Ruby26-x64/lib/ruby/2.6.0-r./siteconf20200718-41156-1cxbffc.rb extconf.rb 正在检查sqlite3.h。。。不 缺少sqlite3.h。从第一个安装SQLite3。 ***extconf.rb失败*** 由于某些原因无法创建Makefile,可能缺少必要的 库和/或标题。有关详细信息,请查看mkmf.log文件。你可以 需要配置选项

提供的配置选项: --使用opt dir --不带opt dir --选择包含 --不带opt include=${opt dir}/include --使用opt lib --不带opt lib=${opt dir}/lib --用make prog --没有make prog --srcdir=。 --库尔迪尔 --ruby=C:/Ruby26-x64/bin/$(ruby\u BASE\u NAME) --使用sqlcipher --没有sqlcipher --with-sqlite3-config --不带-sqlite3-config --使用pkg配置 --没有pkg配置 --使用sqlcipher --没有sqlcipher --with-sqlite3-dir --不带-sqlite3-dir --with-sqlite3-include --不带-sqlite3-include=${sqlite3 dir}/include --with-sqlite3-lib --不带-sqlite3-lib=${sqlite3 dir}/lib

要了解此扩展未能编译的原因,请检查mkmf.log,该日志可在此处找到:

C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.2/mkmf.log


extconf失败,退出代码为1。因此,默认情况下,带有MSYS2的Ruby DevKit 2.6.6-1-x64的新安装肯定会中断

我要修复PGP问题,请启动可在./Ruby26-x64/msys2/目录中找到的mingw64 shell,并通过执行以下行重置pacman密钥库:

rm -r /etc/pacman.d/gnupg/
pacman-key --init
pacman-key --populate msys2

现在您应该能够安装rails而不会出错。

事实上,@godsim解决方案确实在工作,但提供了一系列可能的其他解决方案以及解释。这是:

curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig

pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
==>正在检查msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig。。。(分离) gpg:签署日期:星期一6月29日07:36:14 2020 CEST gpg:使用DSA密钥AD351C50AE085775EB59333B5F92EFC1A47D45A1 gpg:Alexey Pavlov(Alexpux)的良好签名alexpux@gmail.com“[全文]

这还不够。以下是对我有用的一句话:

pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz

pacman-U--config作为一个绝对的RubyNoob,我在尝试初始化一个新的rails应用程序时也被困在这里。有人能帮忙吗?
pacman -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz