Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ***
like image 240
Michael Durrant Avatar asked Dec 15 '22 19:12

Michael Durrant


1 Answers

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).

like image 90
dimitarvp Avatar answered Dec 27 '22 03:12

dimitarvp