![](/img/trans.png)
[英]Error with sudo gem install sqlite3 and gem install sqlite3
[英]fail to 'gem install sqlite3'
當我運行rails new todo
,它顯示如下(相關問題確保 'gem install ~ ' 在捆綁之前成功)。
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/sqlit
e3-1.3.10-x64-mingw32.gem)
An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
當我運行gem install sqlite3
,它顯示如下。
C:\Ruby21-x64>gem install sqlite3
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
C:/Ruby21-x64/bin/ruby.exe extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby21-x64/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite
3-1.3.10 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0
/sqlite3-1.3.10/gem_make.out
按照我的教科書,我已經下載了 'sqlite-shell-win32-x86' ,創建了 'c:\\sqlite3' 文件夾,在該文件夾中添加了 'sqlite3.exe' 並添加了路徑 'c:\\sqlite3'。
我該怎么辦? 我無法啟動 RoR...
添加
他說
checking for sqlite3.h... no
sqlite3.h is missing.
我找到了 sqlite3.h(這是在 sqlite-amalgamation 文件夾中),所以我想接下來要做的是將它放在正確的文件夾中。 哪里是? 我將 sqlite3.h 放在 ruby.exe 所在的文件夾中,但他仍然說sqlite3.h is missing.
.
您缺乏 gem 所需的系統依賴項。
sudo apt-get install sqlite3 libsqlite3-dev
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.