bash complains file not found for existing sqlite3 executable
(1) By anonymous on 2022-03-07 20:06:57 [link] [source]
I get a strange file not found error when running precompiled sqlite3
binary:
/tmp/sqlite> ./sqlite-tools-linux-x86-3380000/sqlite3
bash: ./sqlite-tools-linux-x86-3380000/sqlite3: No such file or directory
But the file does exist:
/tmp/sqlite> ls -l ./sqlite-tools-linux-x86-3380000/sqlite3
-rwxrwxr-x 1 **** **** 1202884 Feb 22 19:19 ./sqlite-tools-linux-x86-3380000/sqlite3
I downloaded sqlite3 Precompiled Binaries for Linux listed at https://sqlite.org/download.html:
/tmp/sqlite> wget https://sqlite.org/2022/sqlite-tools-linux-x86-3380000.zip
--2022-03-07 19:53:33-- https://sqlite.org/2022/sqlite-tools-linux-x86-3380000.zip
Resolving sqlite.org (sqlite.org)... 45.33.6.223
Connecting to sqlite.org (sqlite.org)|45.33.6.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2231371 (2.1M) [application/zip]
Saving to: ‘sqlite-tools-linux-x86-3380000.zip’
sqlite-tools-linux-x86-3380000.zip 100%[===============================================================>] 2.13M 2.25MB/s in 0.9s
2022-03-07 19:53:35 (2.25 MB/s) - ‘sqlite-tools-linux-x86-3380000.zip’ saved [2231371/2231371]
/tmp/sqlite> unzip sqlite-tools-linux-x86-3380000.zip
Archive: sqlite-tools-linux-x86-3380000.zip
creating: sqlite-tools-linux-x86-3380000/
inflating: sqlite-tools-linux-x86-3380000/sqlite3
inflating: sqlite-tools-linux-x86-3380000/sqlite3_analyzer
inflating: sqlite-tools-linux-x86-3380000/sqldiff
Not sure if I am making some very stupid mistake or is the sqlite3
Linux executable is broken?
(2) By Larry Brasfield (larrybr) on 2022-03-07 20:43:53 in reply to 1 [source]
I just created directory /tmp/sqlite on my 64-bit Xubuntu system, and fetched and unzipped the archive just as you show, whereupon I could invoke sqlite3 just as you did and see its startup banner and prompt.
When, from that same directory, I enter:
file ./sqlite-tools-linux-x86-3380000/sqlite3
, I get this info:
./sqlite-tools-linux-x86-3380000/sqlite3: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 4.3.0, stripped
. I wonder what you see. I am guessing that your system is not configured to run 32-bit binaries, and that no interpreter will be listed in your "file ..." output.
If that is the case, you have 2 options: Install whatever package allows 32-bit binaries to be run; or get the source and build a 64-bit binary for your system. You may want to consult the docs on how to do that.