调用'build install'时EC2上有rails的问题

时间:2011-08-10 18:21:12

标签: ruby-on-rails amazon-ec2

刚刚在亚马逊上完成了EC2的旋转,并安装了导轨和红宝石。当我尝试调用bundle install时,我收到以下错误:

Installing sqlite3 (1.3.3) with native extensions /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': ERROR: Failed to bui                                                            ld gem native extension. (Gem::Installer::ExtensionBuildError)

        /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 (the
location where your sqlite3 shared library is located).
*** 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/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

是的,我已经运行'yum install sqlite3-devel'。

2 个答案:

答案 0 :(得分:0)

也许也试试:

yum install sqlite3
yum install ruby-devel

答案 1 :(得分:0)

我有同样的问题。感谢这个论坛条目,我想出了:http://railsforum.com/viewtopic.php?id=22116

你必须:

sudo yum install make sudo yum安装gcc

令人惊讶的是,它们不是AWS AMI的标准。我正在疯狂追逐,试图通过使sqlite3.h可用来解决问题,但这一直是一个更基本的问题。 make和gcc都丢失了。希望这也有助于你的案例。