Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm new to sqlite , I just got the binary of sqlite by using wget http://www.sqlite.org/sqlite-shell-linux-x86-3071300.zip, then extract sqlite3 from the zip file, it does not work, it's driving me crazy, please HELP.

My OS is Ubuntu 12.04 64-bit, the steps of execution of sqlite as follows,

u1@newhost:/tmp$ ls -hl sqli*
-rwxrwxr-x 1 u1 u1 568K Jun 11 17:35 sqlite3
-rw-rw-r-- 1 u1 u1 310K Jun 12 02:53 sqlite-shell-linux-x86-3071300.zip
u1@newhost:/tmp$ file sqlite3
sqlite3: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x8637c6613a485b675a05f155564cc0eda4b2d3cc, stripped
u1@newhost:/tmp$ ./sqlite3 mydb.db
-bash: ./sqlite3: No such file or directory

For security reason, I removed . from the $PATH, so I just use ./sqlite3 to launch


this way works for Fedora 15 32-bit

[root@newhostfedora15 ~]# ./sqlite3 test.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .e

this also works on CentOS 5.6 64-bit

BUT DOES NOT work for root on My Ubuntu 12.04 64-bit either,

root@newhost:~# unzip sqlite-shell-linux-x86-3071300.zip
Archive:  sqlite-shell-linux-x86-3071300.zip
  inflating: sqlite3
root@newhost:~# ./sqlite3 f
-bash: ./sqlite3: No such file or directory
root@newhost:~# ldd ./sqlite3
        not a dynamic executable

I got this issue as the result, it works on Ubuntu 12.04 32-bit, CenetOS 5.6 64-bit, DOES NOT WORK on Ubuntu 12.04 64-bit, Fedora 17 64-bit, sqlite's 32-bit binary is great enough although it doesn't work for every platform. I'll keep it in mind that to it is best to compile my own 64-bit binary from the source or it will be awesome if sqlite 64-bit binary is provide through the official web-site :P

share|improve this question
add comment

1 Answer

With Ubuntu (as well as many other Linux distributions) the preferred method of installing software is to use the package management infrastructure. One tool for package management on Ubuntu is apt-get.

For example, to install sqlite3:

sudo apt-get update
sudo apt-get install sqlite3

this will download the official Ubuntu build of sqlite, and install it on your system. This way, you don't have to deal with the downloading yourself, or debugging problems with incompatible binary versions.

[The first command, sudo apt-get update just downloads the most recent list of packages available. You don't need to do this every time you want to install a package]

Then, you can just run sqlite3:

share|improve this answer
Jeremy Kerr, thanks for your words, and I know apt-get isntall sqlite3 works :-), but I can't figure out why it does not work in the direct binary way of installation. I'll try this on Fedora and CentOS later. –  vicd Jun 13 '12 at 14:11
In this case, it's probably because the ELF binary is referencing a dynamic library (or dynamic linker) that isn't present on your system. ldd ./sqlite3 will tell you which libraries it requires. –  Jeremy Kerr Jun 13 '12 at 14:29
I forgot that I'm running a 64-bit, I think this may cause the issue, I'm checking now.... OMG, but it seems that there is no 64-bit binary file on their site. :D –  vicd Jun 13 '12 at 14:35
it's ok with 32-bit sqlite binary file running on 64-bit CentOS, I just tested this! So I'm taking your suggestion ldd to have a check on My Ubuntu 12.04 64-bit. –  vicd Jun 13 '12 at 14:42
ldd ./sqlite3 the result is : not a dynamic executable, Please see the update of my post, I'm checking if it works on Ubuntu 12.04 32-bit, OOOOOMMMGGG –  vicd Jun 13 '12 at 14:52
show 1 more comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.