Ruby: Mint12 Sqlite3 Install Issues (sqlite3.h)

On the latest version of Linux Mint 12 (the Linux platform I prefer for Ruby development) I ran a bundle install on a small application using Sqlite3 and ran into the following error message. After a little Google search I found that my installing Sqlite3 did not give Gem all the build files it requires to build the Sqlite3-ruby gem with native extensions. So if you are running into the same issue make sure you run the following commands prior to running bundle install.

<<<>>>

sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev

<<<>>>

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/home/tim/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for sqlite3.h… no
sqlite3.h is missing. Try ‘port install sqlite3 +universal’
or ‘yum install sqlite-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
–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=/home/tim/.rvm/rubies/ruby-1.9.2-p290/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
–enable-local
–disable-local
Gem files will remain installed in /home/tim/.rvm/gems/ruby-1.9.2-p290@CorDev1.9.2/gems/sqlite3-1.3.6 for inspection.
Results logged to /home/tim/.rvm/gems/ruby-1.9.2-p290@CorDev1.9.2/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s