Take the 2-minute tour ×

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

share|improve this question

2 Answers 2

I just tested today on AWS' AMI. Same problem at first when trying to install the sqlite3 gem. Tried as told by the installer, no luck. However, I tried

sudo gem install sqlite-devel

and it worked, could install the sqlite3 gem after that...

Hoping it'll help.

share|improve this answer

I figured it out, I guess this answer on stackoverflow will also help you


share|improve this answer

Your Answer


