我正在嘗試執行二進位文件這個交叉編譯工具鏈(連結到 .tar.bz2 檔案)。
當我嘗試運行二進位時,我收到一條令人驚訝的訊息,表明該文件不在我的中$PATH
,即使它存在並且可執行:
$ cross-compiler-armv4l/bin/armv4l-gcc
can't find cross-compiler-armv4l/bin/armv4l-gcc in $PATH
$ ls -l cross-compiler-armv4l/bin/armv4l-gcc
-rwxr-xr-x 1 rzg rzg 31964 Apr 5 2009 cross-compiler-armv4l/bin/armv4l-gcc
我在 x86_64 上運行 Ubuntu 18.04,並且我運行的檔案的體系結構是 32 位,所以我遵循這個答案安裝 i386 libc,但這還不夠。
$ file cross-compiler-armv4l/bin/armv4l-gcc
cross-compiler-armv4l/bin/armv4l-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
如果我運行strace
,stat
文件的失敗:
access("/home/user/busybox-1.32.0/cross-compiler-armv4l/bin/armv4l-gcc", X_OK) = 0
stat("/home/user/busybox-1.32.0/cross-compiler-armv4l/bin/armv4l-gcc", 0xffe4d108) = -1 EOVERFLOW (Value too large for defined data type)