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
u1@newhost:/tmp$
For security reason, I removed . from the $PATH, so I just use ./sqlite3
to launch
UPDATE BELOW:
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