安装 sqlite3-ruby 时出现问题! [英] Problem installing sqlite3-ruby!

查看:18
本文介绍了安装 sqlite3-ruby 时出现问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 crunchbang linux 上安装 sqlite3-ruby gem 时遇到问题.在谷歌搜索了过去几个小时并跟踪了几个有同样问题的人之后,我仍然没有让它工作.

I'm having issues installing the sqlite3-ruby gem on crunchbang linux. After googling the past few hours and following several people with the same problem, I still haven't gotten it to work.

这是我在尝试sudo gem install sqlite3-ruby"后看到的

Here is what I see after trying a 'sudo gem install sqlite3-ruby'

构建原生扩展.这可能需要一段时间...
错误:安装 sqlite3-ruby 时出错:
错误:无法构建 gem 原生扩展.

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

/usr/bin/ruby1.8 extconf.rb
检查 sqlite3.h... 是的
检查 -lsqlite3 中的 sqlite3_libversion_number()... 是
检查 rb_proc_arity()...否
检查 sqlite3_initialize()... 否
sqlite3-ruby 仅支持 sqlite3 版本 3.6.16+,请升级!
* extconf.rb 失败 *
由于某种原因无法创建 Makefile,可能缺少
必要的库和/或头文件.查看 mkmf.log 文件了解更多信息
细节.您可能需要配置选项.

/usr/bin/ruby1.8 extconf.rb
checking for 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.

接下来我浏览了这个页面;http://groups.google.com/group/sqlite3-ruby/browse_thread/thread/f22d098b561c48af/6e754f7b2fc3cd75?#6e754f7b2fc3cd75

Next I ran across this page; http://groups.google.com/group/sqlite3-ruby/browse_thread/thread/f22d098b561c48af/6e754f7b2fc3cd75?#6e754f7b2fc3cd75

我下载了 sqlite-amalgamation-3.7.0.1.tar.gz 并发出以下命令:

I downloaded sqlite-amalgamation-3.7.0.1.tar.gz and issued the following commands:

tar zxvf sqlite-amalgamation-3.7.0.1.tar.gz
cd cd sqlite-3.7.0.1
mkdir $HOME/sqlite
./configure --prefix=$HOME/sqlite
制作&&进行安装
sudo gem install sqlite3-ruby -- --with-sqlite3-dir=$HOME/sqlite

tar zxvf sqlite-amalgamation-3.7.0.1.tar.gz
cd cd sqlite-3.7.0.1
mkdir $HOME/sqlite
./configure --prefix=$HOME/sqlite
make && make install
sudo gem install sqlite3-ruby -- --with-sqlite3-dir=$HOME/sqlite

但是,我仍然得到完全相同的错误.我使用了'sudo apt-get install sqlite3 libsqlite3-dev',但我仍然得到完全相同的错误.

However, I still get the exact same error. I've used 'sudo apt-get install sqlite3 libsqlite3-dev' but I still get the exact same error.

有什么建议吗?

顺便说一句,为什么当我使用sudo apt-get install sqlite3"时,它会抓取 3.5.9 而不是我手动下载的 3.7.0.1?

And as a small aside, how come when I use 'sudo apt-get install sqlite3', it grabs 3.5.9 instead of the 3.7.0.1 I manually downloaded?

推荐答案

安装低版本的sqlite3-ruby应该可以解决你的问题:

Install a lower version of sqlite3-ruby should resolve your problem:

sudo gem install sqlite3-ruby --version=1.2.5

这篇关于安装 sqlite3-ruby 时出现问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆