2010-08-19 171 views
0

我安裝了xcode 3.0。我需要安裝sqlite3-ruby gem(用於rhosync)。無法安裝sqlite3-ruby寶石

當我運行:

sudo gem install -l sqlite3-ruby 

我獲得以下錯誤:

Building native extensions. This could take a while... 
ERROR: Error installing sqlite3-ruby: 
ERROR: Failed to build gem native extension. 

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb 
checking for #include <sqlite3.h> 
... yes 
checking for sqlite3_libversion_number() in -lsqlite3... yes 
checking for rb_proc_arity()... no 
checking for sqlite3_initialize()... no 
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade! 
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/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 
--with-sqlite3lib 
--without-sqlite3lib 


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection. 
Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out 

我已經檢查過很多鏈接(在堆棧溢出或其他網站),但似乎沒有任何工作。

有人建議從Mac OS X Disk 2安裝Ruby Headers,但我沒有該光盤。我已經安裝了XCode 3.0 SDK。

我該怎麼辦?

+0

你安裝了sqlite3嗎? – Skilldrick 2010-08-19 09:25:44

+0

XCode在/ Developer/SDKs .....文件夾中安裝了sqlite3。我已經單獨從sqlite網站下載了sqlite3,但它是一個「應用程序」文件,而不是一個庫。我需要做其他事嗎? – 2010-08-19 09:29:11

回答

3

我從http://macports.org安裝MacPorts的,然後成功地安裝了sqlite3的,紅寶石後跑

sudo port install sqlite3