无法安装sqlite3-ruby gem [英] Unable to install sqlite3-ruby gem
本文介绍了无法安装sqlite3-ruby gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我安装了xcode 3.0。我需要安装sqlite3-ruby gem(用于rhosync)。
当我运行时:
sudo gem install -l sqlite3- ruby
我得到以下错误:
构建原生扩展。这可能需要一段时间...
错误:安装sqlite3-ruby时出错:
错误:无法构建gem本机扩展。
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
检查#include< sqlite3.h>
...是
检查sqlite3_libversion_number()in -lsqlite3 ...是
检查rb_proc_arity()... no
检查sqlite3_initialize()...否
sqlite3-ruby仅支持sqlite3版本3.6.16+,请升级!
*** extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少
必需的库和/或头文件。查看mkmf.log文件以获取更多
的详细信息。您可能需要配置选项。
提供的配置选项:
--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文件将保持安装在/Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.3.1中进行检查。
结果记录到/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。
我应该怎么做? http ://macports.org ,然后运行
sudo port install sqlite3
之后,sqlite3-ruby安装成功。
I've xcode 3.0 installed. And I need to install sqlite3-ruby gem (for rhosync).
When I run:
sudo gem install -l sqlite3-ruby
I get following error:
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
I've checked many links (on Stack Overflow and other sites) but nothing seems to work.
Some people suggest that install Ruby Headers from Mac OS X Disk 2. But I don't have that disc. I've instead installed XCode 3.0 SDK.
What should I do?
解决方案
I installed MacPorts from http://macports.org and then ran
sudo port install sqlite3
after that sqlite3-ruby installed successfully.
这篇关于无法安装sqlite3-ruby gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文