Michael Durrant
Michael Durrant

Reputation: 96484

gem install sqlite3 gives error - sqlite3.h is missing

(Ubuntu 12.04)

gem install sqlite3

gives:

$ gem install sqlite3
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
        ERROR: Failed to build gem native extension.

        /home/durrantm/.rvm/rubies/ruby-1.9.3-p194/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 ***

Upvotes: 4

Views: 5464

Answers (1)

dimitarvp
dimitarvp

Reputation: 2383

I am seeing you are on Linux. Installing the libsqlite3-dev package should fix your problem (at least that's what it's called on Debian).

e.g. sudo apt-get install libsqlite3-dev

If that's not the right package name, just look around for sqlite3's development package (which includes headers and often times compiler/linker intermediate files).

Upvotes: 12

Related Questions