I got php-cli-static from https://www.workerman.net/download
but it can not run under raspberrypi (both aarch64 and armv7l have the same result)
while i can run swoole-cli from https://swoole.com/download
when I use file command to test the file type from https://www.workerman.net/download , it tell me the type are x86-64
that make me confuse , is there any problem ?
sorry , can not use chinese input software in raspberrypi, so i use english ,you can answer me in chinese
here is my test record below:
www@raspberrypi:~/Downloads $ ls -l -h
total 270M
-rwxr-xr-x 1 www www 29M Aug 10 21:01 php-7.4.33-aarch64
-rwxr-xr-x 1 www www 29M Aug 10 21:02 php-7.4.33-arm
-rw-r--r-- 1 www www 8.4M Oct 29 14:11 php-7.4.33-static-bin-aarch64.tar.gz
-rw-r--r-- 1 www www 8.4M Oct 29 14:13 php-7.4.33-static-bin-armv7l.tar.gz
-rw-r--r-- 1 www www 8.9M Oct 29 14:11 php-8.2.8-static-bin-aarch64.tar.gz
-rw-r--r-- 1 www www 8.9M Oct 29 14:13 php-8.2.8-static-bin-armv7l.tar.gz
-rwxr-xr-x 1 www www 38M Feb 24 2023 swoole-cli-v4.8.13-linux-arm64
-rw-r--r-- 1 www www 9.8M Oct 29 14:25 swoole-cli-v4.8.13-linux-arm64.tar.xz
-rwxr-xr-x 1 www www 66M May 9 12:14 swoole-cli-v5.0.3-linux-arm64
-rw-r--r-- 1 www www 66M Oct 29 14:18 swoole-cli-v5.0.3-linux-arm64.tar
www@raspberrypi:~/Downloads $ file swoole-cli-v5.0.3-linux-arm64
swoole-cli-v5.0.3-linux-arm64: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, BuildID[sha1]=f3b0ee014c5a6a17c4679b8b430290ad920caf4f, stripped
www@raspberrypi:~/Downloads $ file php-7.4.33-arm
php-7.4.33-arm: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
www@raspberrypi:~/Downloads $ file php-7.4.33-aarch64
php-7.4.33-aarch64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
www@raspberrypi:~/Downloads $ ./swoole-cli-v5.0.3-linux-arm64 -v
Swoole 5.0.3 (cli) (built: May 9 2023 04:10:51) (NTS)
www@raspberrypi:~/Downloads $ ./php-7.4.33-arm -v
bash: ./php-7.4.33-arm: cannot execute binary file: Exec format error
none
none
www@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
@walker
从这个平台 https://www.workerman.net/download 下载的php arm和aarch版本Php静态程序运行不了,使用file指令测试之后发现是 x86_64 格式,但是从swoole官方下载的就可以运行,怀疑网址提供的下载安装包内容有异常。
可能是我编译的有问题,试下 https://dl.static-php.dev/static-php-cli/common/