我在arm64服务器上安装了Ubuntu 16.04.2 LTS:
# uname -a
Linux test 4.9.23-std-1 #1 SMP Mon Apr 24 13:18:14 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
我运行以下命令来启用armhf
软件包安装:
# dpkg --add-architecture armhf
然后,我安装了该traceroute
软件包:
# apt-get install traceroute:armhf
Reading package lists... Done
Building dependency tree
[...]
Preparing to unpack .../traceroute_1%3a2.0.21-1_armhf.deb ...
Unpacking traceroute:armhf (1:2.0.21-1) ...
Processing triggers for man-db (2.7.5-1) ...
但是,我无法启动可执行文件:
# traceroute
-bash: /usr/sbin/traceroute: cannot execute binary file: Exec format error
更多的信息:
# file /usr/bin/traceroute.db
/usr/bin/traceroute.db: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux
2.6.32, BuildID[sha1]=0ebd0553e26b163dd848c131fe8ee0a4a2409109, stripped
# ldd /usr/bin/traceroute.db
not a dynamic executable
我还尝试安装binfmt-support
并确认binfmt_misc
模块已加载。
是不是arm64
与向后兼容armhf
?如何armhf
在arm64
服务器上运行可执行文件?
显然,所有依赖项以及解释器也都必须是32位的
—
YoureAGitForNotUsingGit
你表演过
—
Marcos Silveira
apt-get update; apt-get upgrade
之后dpkg --add-architecture armhf
吗?
@MarcosSilveira是的,没有区别。
—
内森·奥斯曼