Error sqlite3_open_v2

after turning on the server (rails s), receiving an error message when viewing a remote link. then:

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

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

+6
source share
4 answers

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

That was the way

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

And I added it to the profile:

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

This solved the problem for me.

+4
source

I also had this problem.

I solved it like this:

 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 
+3
source

I have the same problem and the only possible answer I found is:

"sqlite3 not found" error in ruby ​​on rails

so you can try to install

gem install sqlite3-ruby

I could not try, because it requires ruby ​​1.8.7, maybe this is what you need.

Hi

0
source

FWIW, I had to install sqlite3 first, because my existing version was too old, and then built sqlite3 with a stone, pointing to the correct libraries:

 wget http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz tar -zxvf sqlite-autoconf-3070701.tar.gz cd sqlite-autoconf-3070701 ./configure make && make install gem install sqlite3 -- --with-sqlite3-include=/usr/local/include --with-sqlite3-lib=/usr/local/lib 
0
source

Source: https://habr.com/ru/post/896545/


All Articles