在安装了sqlite-devel库的AWS Linux实例上安装sqlite gem失败

我正在运行一个由ami-595a0a1c构build的实例。 我正在尝试安装sqlite3(或sqlite)gem,它的失败与下面的错误:

$ sudo gem install sqlite3 Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb checking for sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel' and check your shared library search path 

(你的sqlite3共享库所在的位置)。 extconf.rb失败***由于某种原因无法创buildMakefile,可能缺less必要的库和/或头文件。 检查mkmf.log文件以获取更多详细信息。 您可能需要configuration选项。

 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/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 Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/sqlite3-1.3.3 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out 

通常情况下,这意味着你需要安装开发库,一切都很好。 不过,我已经安装了sqlite-devel软件包,仍然没有骰子。 由于这是Amazon Linux实例,我宁愿不添加比Amazon提供的更多的存储库(如果可能的话)。 我能做些什么来获得这个东西来编译? 感谢任何见解!

从一个全新的例子来看,这是我所做的:

$ sudo yum安装rubygems ruby​​-devel

$ sudo gem update –system

$ sudo gem install rails

$ rails新应用程序

$ cd应用程序

$ rails服务器

在Gemfile中列出的任何gem源中都找不到gem'sqlite3(> = 0)'。

$ sudo yum安装sqlite-devel

$ sudo gem安装sqlite(或者sqlite3 – 相同的结果)

见上面的破损

我刚刚在AWS的AMI上进行了testing。 第一次尝试安装sqlite3的gem时,同样的问题。 尝试安装程序告诉,没有运气。 不过,我试过了

 sudo gem install sqlite-devel 

它的工作,可以安装sqlite3gem之后…

希望它会有所帮助。