5

I had the Ubuntu repositories of SQLite3 with v3.7.17. But it doesn't have the .save command as newer versions.

To update I did:

  1. sudo apt-get purge sqlite3
  2. Download SQLite 3.8.4.3
  3. Install it with ./configure && make && sudo make install

But now when I try to run sqlite3 from command line I get:

SQLite header and source version mismatch
2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668
2014-04-03 16:53:12 a611fa96c4a848614efe899130359c9f6fb889c3

Searching I found two solutions that I've tried without success:

  • This answer didn't work because I don't have sqlite on /usr/bin
  • This solution didn't work neither, but I did backup to revert those useless changes.

Any idea of how to solve this error?

3 Answers 3

11

After building from source, your v3.8.4.3 version is now installed in /usr/local/lib.

You need to replace /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 (or /usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6 for i386 arch) with the one from /usr/local/lib:

sudo cp /usr/local/lib/libsqlite3.so.0.8.6 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
3

I've just downloaded and compiled it on Debian and had the same problem. I solved it by statically linking sqlite3 :

./configure --disable-dynamic-extensions --enable-static --disable-shared
make
make install

You probably only need --enable-static but I specifically added --disable-shared to be sure.

Regards

0

In my case, the sqlite3 binary was being called from a specific user login (batch script). The script was seeing /usr/bin/sqlite3 before its own application installed sqlite3 version though the libraries of the second were being read and not from the first. I added ${path to special application ~/bin} to the front of the export PATH= line in the users .bashrc file.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .