Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlite3_open_v2 error

Tags:

linux

sqlite

ruby

after turnning on the server (rails s), getting error message when browsing to the remote link. then:

/usr/bin/ruby: symbol lookup error: /usr/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.4/lib/sqlite3/sqlite3_native.so: undefined symbol: sqlite3_open_v2

tryed to install sqlite3 gem / downgrade and nothing solves it. what am i doing wrong?

like image 416
user923594 Avatar asked Sep 03 '11 11:09

user923594


2 Answers

I got this error this week, and resolved it by adding the path to the sqlite library to LD_LIBRARY_PATH:

This was the path

[/usr/local/lib]$ ls
... libsqlite3.a  libsqlite3.la  libsqlite3.so  libsqlite3.so.0  libsqlite3.so.0.8.6

And I added it in the profile:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

This resolved the issue for me.

like image 185
Mike K. Avatar answered Oct 23 '22 07:10

Mike K.


I had this problem too.

I resolved it this way :

mv /usr/lib/libsqlite3.so.0  /usr/lib/libsqlite3.so.0.back
gem install sqlite3 -- --with-sqlite3-include=/usr/local/include --with-sqlite3-lib=/usr/local/lib
like image 33
kwngo Avatar answered Oct 23 '22 08:10

kwngo