簡體   English   中英

安裝sqlite3-ruby gem失敗

[英]Installation of the sqlite3-ruby gem fails

每當我嘗試安裝gem時:

gem install sqlite3-ruby

我得到以下輸出:

D:/Ruby/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=D:/Ruby/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}/
--enable-local
--disable-local

我在Windows上正確安裝了sqlite3:

D:\>sqlite3
SQLite version 3.7.16.2 2013-04-12 11:52:43
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

這是我的第二次安裝嘗試,我再次得到相同的錯誤消息。

問題是我使用的是ruby 2.x(目前是beta而不是使用sqlite3)而不是1.9.3。

您需要首先安裝SQLite,以便獲得ruby gem所需的開發頭。

轉到http://mislav.uniqpath.com/rails/install-sqlite3/#windows ,然后按照說明操作。 然后gem安裝應該成功。

顯而易見,您的錯誤消息顯示“首先安裝SQLite3 ...”。

嘗試:

gem install sqlite3

如果這解決了您的問題,請隨時通知我。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM