Skip to content

Instantly share code, notes, and snippets.

@cnruby
Created May 8, 2011 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cnruby/961689 to your computer and use it in GitHub Desktop.
Save cnruby/961689 to your computer and use it in GitHub Desktop.
HOW TO INSTALL SQLITE3 ON DEBIAN
$ aptitude install sqlite3 libsqlite3-dev
$ wget http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz
$ apt-get build-dep sqlite3
$ tar vvvvvxzf sqli*
$ cd sqli* && ./configure
$ make && make install
$ cp /usr/local/lib/libsqlite3.* /usr/lib/
$ ldconfig
$ bundle install sqlite3-ruby
@jhass
Copy link

jhass commented Aug 2, 2016

For people ending up here through Google, don't do this.

Installing a packaged version and then 3.7.4 with make install just does not makes much sense. Especially given most distros ship a newer version than that by now. Also given this copies the library to /usr/lib instead of configuring LIBRARY_PATH and LD_LIBRARY_PATH where necessary, will make the linker prefer the manually installed version over the packaged version on most distros, since /usr/lib comes earlier in the default linker paths.

@mldisibio
Copy link

For people ending up here through Google, don't do this literally, but the template is very useful and practical.
This specific script was created in 2011, so version 3.7.4 is quite outdated and yes, debian distros have a newer version of sqlite3. However, the sqlite3 that comes with the latest debian is still somewhere between a few months and few years older than the latest available release of sqlite3, so common sense requires one to update the script to download to the latest tar (or whatever newer version they would like).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment