ubuntu18.04 64位运行32位的arm-openwrt-linux-gnueabi-gcc
程序员文章站
2024-02-20 21:02:58
...
-
问题:
在ubuntu18.04上用32位的工具链交叉编译程序是发现工具链不可用:/bin/arm-openwrt-linux-gcc command not found /bin/arm-openwrt-linux-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory Makefile:14: recipe for target 'pthread' failed make: *** [pthread] Error 127
-
解决办法
file查看可执行文件arm-openwrt-linux-gnueabi-gcc的属性:pam:~$ file /home/pam/share/QSDK/toolchain-arm_cortex-a7_gcc-5.2.0_glibc-2.21_eabi/bin/arm-openwrt-linux-gnueabi-gcc /home/pam/share/QSDK/toolchain-arm_cortex-a7_gcc-5.2.0_glibc-2.21_eabi/bin/arm-openwrt-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=2eb0d86fbf258985fff271c44141d2da7d46bcb5, with debug_info, not stripped
为32位程序, 而主机是64位:
pam:~$ uname -a Linux sercomm 4.15.0-106-generic #107-Ubuntu SMP Thu Jun 4 11:27:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
安装以下包即可:
sudo apt-get install lib32ncurses5 lib32z1 lib32stdc++6
上一篇: Photoshop 逼真的花纹地毯图案