开发者

issues with rails on EC2 when calling 'build install'

开发者 https://www.devze.com 2023-03-27 18:17 出处:网络
Just finished spinning an instance of EC2 on amazon and installed rails and ruby. When I tried to call bundle install however, I am getting the following error:

Just finished spinning an instance of EC2 on amazon and installed rails and ruby. When I tried to call bundle install however, I am getting the following error:

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
 开发者_Python百科       --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

yes I have run 'yum install sqlite3-devel'.


Maybe also try:

yum install sqlite3
yum install ruby-devel


I had the same issue. Thanks to this forum entry, I figured it out: http://railsforum.com/viewtopic.php?id=22116

You've got to:

sudo yum install make sudo yum install gcc

Surprisingly, they are not standard in AWS AMI. I was on a wild goose chase, trying to solve the problem by making sqlite3.h available, but it was a more basic problem all along. Both make and gcc were missing. Hope that also helps your case.

0

精彩评论

暂无评论...
验证码 换一张
取 消