sqlite3-ruby install error on Ubuntu(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 安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Ubuntu 上的 sqlite3-ruby 安装错误
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- SQL 临时表问题 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01