Skip to content

Instantly share code, notes, and snippets.

@fabrizioc1
Created July 14, 2011 18:34
Show Gist options
  • Save fabrizioc1/1083087 to your computer and use it in GitHub Desktop.
Save fabrizioc1/1083087 to your computer and use it in GitHub Desktop.
Installing sqlite3 in CentOS for use with ruby-sqlite3
# The YUM package is too old for use with ruby-sqlite3, use the autoconf package from www.sqlite.org
cd /opt
wget http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz
tar xvzf sqlite-autoconf-3070701.tar.gz
ln -s /opt/sqlite-autoconf-3070701 /opt/sqlite3
cd /opt/sqlite3
./configure --prefix=/opt/sqlite3
make
make install
# Shared library will be installed in /usr/local/lib.
# Make sure you it first in your LD_LIBRARY_PATH
# Make sure to add it to your start-up files, like .bashrc
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
# Now it should work
gem install sqlite3
@bnewland
Copy link

ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.

@grupogenesys
Copy link

gem install sqlite3 -- --with-sqlite3-dir=/path/to/sqlite3/directory

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