环境:ubuntu 14.04 64bit
一、刚开始的时候报错信息如下:
arm-linux-gnueabihf-gcc: command not found.(确认不是PATH问题)
出现这种情况的原因是:在64位Linux系统下无法兼容32位交叉编译器。
安装32位兼容包解决该问题
sudoapt-get install lib32ncurses5 lib32z1
运行arm-linux-gnueabihf-gcc –v出现arm-linux-gnueabihf-gcc: error while loadingshared libraries: libstdc++.so.6: cannot open shared object file: No such fileor directory错误,
安装:
sudo apt-get install lib32stdc++6
二、如果还会报如下错误:
arm-linux-gnueabihf-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
解决办法:
apt-get install lib32z1 lib32ncurses5
apt-get install lib32stdc++6
解决libstdc++.so.6: cannot open shared object file: No such file or directory:
原因在于,在13.10 版本中,ia32_libs 被废弃了导致没有32位的lib库。
解决方法
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
查看编译工具链是否安装成功:

博客围绕Ubuntu 14.04 64bit系统展开,主要讲述32位交叉编译器使用时的报错问题。先是出现‘arm-linux-gnueabihf-gcc: command not found’,原因是64位系统不兼容32位编译器,需安装32位兼容包。还会出现‘libstdc++.so.6: cannot open shared object file’错误,给出了相应安装命令解决。

2555

被折叠的 条评论
为什么被折叠?



