运行预编译的二进制文件时,出现奇怪的文件未找到错误sqlite3
:
/tmp/sqlite> ./sqlite-tools-linux-x86-3380000/sqlite3
bash: ./sqlite-tools-linux-x86-3380000/sqlite3: No such file or directory
但该文件确实存在:
/tmp/sqlite> ls -l ./sqlite-tools-linux-x86-3380000/sqlite3
-rwxrwxr-x 1 **** **** 1202884 Feb 22 19:19 ./sqlite-tools-linux-x86-3380000/sqlite3
我下载了 sqlite3 预编译二进制文件,适用于 Linux,网址为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
不确定我是否犯了一些非常愚蠢的错误或者sqlite3
Linux 可执行文件是否已损坏?
答案1
根据 Kamil 的评论,这是由于 64 位/32 位问题造成的。