无法安装sqlite3-ruby gem[英] Unable to install sqlite3-ruby gem

本文是小编为大家收集整理的关于无法安装sqlite3-ruby gem的处理方法,想解了无法安装sqlite3-ruby gem的问题怎么解决?无法安装sqlite3-ruby gem问题的解决办法?那么可以参考本文帮助大家快速定位并解决问题。

问题描述

我已经安装了 xcode 3.0.我需要安装 sqlite3-ruby gem(用于 rhosync).

当我跑步时:

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

我检查了很多链接(在 Stack Overflow 和其他网站上),但似乎没有任何效果.

有些人建议从 Mac OS X Disk 2 安装 Ruby Headers.但我没有那个光盘.我已经安装了 XCode 3.0 SDK.

我该怎么办?

推荐答案

我从 http://macports.org 安装了 MacPorts 然后跑

sudo port install sqlite3

sqlite3-ruby 安装成功后.

本文地址:https://www.itbaoku.cn/post/786322.html