SQLite User Forum

sqlite3, bash reports: ’no such file or directory’
Login

sqlite3, bash reports: 'no such file or directory'

(1) By anonymous on 2022-09-08 17:51:43 [link] [source]

Hi, 
after unpacking the sqlite-tools-linux-x86-3390300.zip file and running command ./sqlite3, the message "-bash: ./sqlite3: No such file or directory" appeared. 

What may be missing?

e-mail: stykepok@gmail.com

(2) By Stephan Beal (stephan) on 2022-09-08 18:04:19 in reply to 1 [link] [source]

What may be missing?

That the zip does not unpack everything into the current directory: it unpacks a subdirectory.

$ unzip -l ~/Downloads/sqlite-tools-linux-x86-3390300.zip | head
Archive:  /home/stephan/Downloads/sqlite-tools-linux-x86-3390300.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2022-09-05 13:29   sqlite-tools-linux-x86-3390300/
   634768  2022-09-05 13:29   sqlite-tools-linux-x86-3390300/sqldiff
  1211076  2022-09-05 13:29   sqlite-tools-linux-x86-3390300/sqlite3
  2567200  2022-09-05 13:29   sqlite-tools-linux-x86-3390300/sqlite3_analyzer

(3) By Stephan Beal (stephan) on 2022-09-08 22:57:40 in reply to 1 [link] [source]

after unpacking the sqlite-tools-linux-x86-3390300.zip file and running command ./sqlite3, the message "-bash: ./sqlite3: No such file or directory" appeared.

FYI: i rejected your derogatory response (please re-read your original post to see why that response was entirely out of line), but its tone hinted at another cause for the problem you're reporting:

Make sure that your unpacked sqlite3 is executable. Depending on how and where you are unpacking it, it might not be executable (e.g. unpacking it to a drive which is mounted with the noexec flag, like a typical Windows drive or SMB network mount point). The one from the downloads page most certainly is executable when unpacked on a filesystem which supports it using an unzip tool which supports that bit:

[stephan@nuc:~/Downloads]$ unzip sqlite-tools-linux-x86-3390300.zip 
Archive:  sqlite-tools-linux-x86-3390300.zip
   creating: sqlite-tools-linux-x86-3390300/
  inflating: sqlite-tools-linux-x86-3390300/sqldiff  
  inflating: sqlite-tools-linux-x86-3390300/sqlite3  
  inflating: sqlite-tools-linux-x86-3390300/sqlite3_analyzer  

[stephan@nuc:~/Downloads]$ l sqlite-tools-linux-x86-3390300
total 4328
drwxrwxr-x 2 stephan stephan    4096 Sep  5 13:29 .
drwxr-xr-x 6 stephan stephan   12288 Sep  9 00:53 ..
-rwxrwxr-x 1 stephan stephan  634768 Sep  5 13:29 sqldiff
-rwxrwxr-x 1 stephan stephan 1211076 Sep  5 13:29 sqlite3
-rwxrwxr-x 1 stephan stephan 2567200 Sep  5 13:29 sqlite3_analyzer

[stephan@nuc:~/Downloads]$ cd sqlite-tools-linux-x86-3390300

[stephan@nuc:~/Downloads/sqlite-tools-linux-x86-3390300]$ ./sqlite3
SQLite version 3.39.3 2022-09-05 11:02:23
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.

(5.1) Originally by anonymous with edits by Stephan Beal (stephan) on 2022-09-09 00:46:25 from 5.0 in reply to 3 [link] [source]

Deleted

(4) By anonymous on 2022-09-09 00:30:47 in reply to 1 [link] [source]

Dear developers and webmasters, when does https://www.sqlite.org/download.html say that precompiled Linux binaries are also available in x86-64 version? Regards. e-mail: stykepok@gmail.com

(6) By Holger J (holgerj) on 2022-09-09 20:21:08 in reply to 1 [source]

This happens when you try to use a 32 bit executable on a 64 bit system.

Unfortunately, the message ist not really specific.

And still, unfortunately, there is no precompiled 64 bit executable.

Otoh, compiling yourself is very easy, but still a hassle.