Installing sqlite gem fails on AWS Linux instance with sqlite-devel libraries installed

Posted by Scott on Server Fault See other posts from Server Fault or by Scott
Published on 2011-03-09T05:21:16Z Indexed on 2011/03/09 8:12 UTC
Read the original article Hit count: 440

Filed under:
|
|
|
|

Hi,

I'm running an instance built off ami-595a0a1c. I am trying to install the sqlite3 (or sqlite) gem and it's failing with the below error:

$ 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

(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
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

Typically, this just means you need to install the development libraries and everything is cool. However, I have installed the sqlite-devel packages and still no dice. Since this is the Amazon Linux instance, I'd rather not add more repositories than the ones Amazon provides if possible. What can i do to get this thing to compile? Thanks for any insight!

From a brand new instance, here's what I've done:

$ sudo yum install rubygems ruby-devel

$ sudo gem update --system

$ sudo gem install rails

$ rails new app

$ cd app

$ rails server

Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile.

$ sudo yum install sqlite-devel

$ sudo gem install sqlite (or sqlite3 -- same result)

See breakage above

© Server Fault or respective owner

Related posts about ruby-on-rails

Related posts about ruby