本文介绍了Ubuntu 上的 sqlite3-ruby 安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 sqlite3-ruby 安装过程中出现以下错误:
<前>构建本机扩展.这可能需要一段时间...错误:安装 sqlite3-ruby 时出错:错误:无法构建 gem 本机扩展./usr/bin/ruby1.8 extconf.rb检查 sqlite3.h... 没有缺少 sqlite3.h.尝试port install sqlite3 +universal"或yum install sqlite3-devel"*** extconf.rb 失败 ***由于某种原因无法创建 Makefile,可能缺少必要的库和/或头文件.查看 mkmf.log 文件了解更多信息细节.您可能需要配置选项.提供的配置选项:--with-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=/usr/bin/ruby1.8--with-sqlite3-dir--without-sqlite3-dir--with-sqlite3-include--without-sqlite3-include=${sqlite3-dir}/include--with-sqlite3-lib--without-sqlite3-lib=${sqlite3-dir}/libGem 文件将保留安装在/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 中以供检查.结果记录到/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.outsqlite3.h 位于/usr/include/
<前>sudo gem 安装 sqlite3-ruby --without-sqlite3-include=/usr/include不起作用
<前>错误:执行 gem 时 ... (OptionParser::InvalidOption)无效选项:--without-sqlite3-include=/usr/includeUbuntu 10.04
解决方案
您需要 SQLite3 开发头文件,以便 gem 的本机扩展进行编译.您可以通过运行(可能使用 sudo
)来安装它们:
apt-get install libsqlite3-dev
I have the following error during sqlite3-ruby install:
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 checking for sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel' *** 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=/usr/bin/ruby1.8 --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out
sqlite3.h is located in /usr/include/
sudo gem install sqlite3-ruby --without-sqlite3-include=/usr/include
doesn't work
ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: --without-sqlite3-include=/usr/include
Ubuntu 10.04
解决方案
You need the SQLite3 development headers for the gem’s native extension to compile against. You can install them by running (possibly with sudo
):
apt-get install libsqlite3-dev
这篇关于Ubuntu 上的 sqlite3-ruby 安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!