Kristen
Kristen

Reputation: 101

SQLite header and source version mismatch

Just installed SQlite3 with homebrew, but when I go to run it I get the following:

SQLite header and source version mismatch
2011-06-25 16:35:41 8f8b373eed7052e6e93c1805fc1effcf1db09366
2012-01-16 13:28:40 ebd01a8deffb5024a5d7494eef800d2366d97204

Noticed that people on Linux and Ubuntu have this problem sometimes, but I'm on a Mac (OS X 10.7.5) so the same solves for them didn't work through Terminal.

Assume there must be another version installed somewhere, but not sure how to solve the problem (fairly new, so over explain please).

Any suggestions?

Upvotes: 4

Views: 7662

Answers (5)

Emanuele Bosimini
Emanuele Bosimini

Reputation: 101

It happened to me right now on Centos 7.

I solved moving binaries in /usr/lib64 and /usr/bin

mv /opt/usr/bin/sqlite3 /usr/lib64 
mv /opt/usr/bin/sqlite3 /usr/bin 

headers in /usr/include

mv /opt/usr/include/sqlite3.h /usr/include/sqlite3.h 
mv /opt/usr/include/sqlite3ext.h /usr/include/sqlite3ext.h 

and libraries in /usr/lib64

mv /opt/usr/bin/sqlite3 /usr/lib64/ 
cp /usr/lib64/ /usr/bin/ 

Upvotes: 0

cinqS
cinqS

Reputation: 1223

I think you once installed sqlite3 as dependency from another installation. This installation as executed by pkg-manager, will install sqlite3 into /usr/bin/.

And I assumed this time you wanted install sqlite3 from building its source. As you install sqlite3 manually, ./configure script will assume your prefix be: /usr/local/bin.

So if you don't want this conflict, try: ./configure --prefix=/usr/ to indicate you want to install into /usr/bin/, thus replace the older one.

regards

Upvotes: 1

Nasir
Nasir

Reputation: 750

This is mostly happening because mismatch of sqlite3 client and other binaries. In my case

IN-PF1CCNV7:/usr/lib64 # rpm -qa | grep sqlite sqlite3-3.28.0-lp151.2.3.1.x86_64 libsqlite3-0-3.23.1-1.10.x86_64 sqlite3-devel-3.23.1-lp150.1.1.x86_64 IN-PF1CCNV7:/usr/lib64 # zypper install sqlite3

I uninstalled sqlite3 and installed same rpm as sqlite3-devel

Upvotes: 0

jaryaman
jaryaman

Reputation: 119

On Ubuntu 12.04 LTS, replacing libsqlite3.so.0 and libsqlite3.so.0.8.6 in /usr/lib/i386-linux-gnu by copying the version from /usr/local/lib, and overwriting the version in /usr/lib/i386-linux-gnu also solved the sqlite3 problem for me.

However, this then interferes with Skype 4.2 for Linux working, causing the message

$ skype

skype: error while loading shared libraries: libsqlite3.so.0: wrong ELF class: ELFCLASS64

Upvotes: 0

Kristen
Kristen

Reputation: 101

I left an answer in the comments but wanted to officially answer on what worked for me:

  1. I copied the sqlite3 exec file that was in my /usr/bin
  2. I replaced the sqlite3 exec in my /usr/local/bin with the copy I made from my /usr/bin

Now it works fine! (I also saved the old Sqlite3 exec file as .old incase I run into any bugs)

Upvotes: 6

Related Questions