参考文章
https://blog.csdn.net/ppdyhappy/article/details/79240092
http://blog.csdn.net/bfboys/article/details/53013662
root@ubuntu:~/extract/sample# make
arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/mac/install/sysroots/eagle8074 -isystem/home/mac/install/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/arm-linux-gnueabihf/include -isystem/home/mac/install/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/arm-linux-gnueabihf/include -L/home/mac/install/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/arm-linux-gnueabihf/lib hello.c -o hello
make: arm-linux-gnueabihf-gcc: Command not found
<builtin>: recipe for target 'hello' failed
make: *** [hello] Error 127
Ubuntu16.04版本已不支持ia32-libs的软件包,而是使用了lib32ncurses5、lib32z1软件包做为替代,所以在Ubuntu16.04版本当中应该安装执行:
apt-get install lib32ncurses5
apt-get install lib32z1
详细说明如下:
Ubuntu Linux 解决 bash ./ 没有那个文件或目录 的方法
经常在ubuntu 64位下运行 ./xxx 会跳出来说没有这个文件或者目录,但是ls看又有这个文件,很是奇怪。
其实原因很简单,是因为他没有32位的运行库 ia32-libs 会出这种八杆子打不着的奇怪提示。
直接安装即可。
apt-get install ia32-libs
然而,ubuntu16.04 并不再支持 ia32-libs 的软件包。
而是用 lib32ncurses5 lib32z1软件包代替了 ia32-libs 软件包,因此,安装lib32ncurses5 lib32z1就可以了:
apt-get install lib32ncurses5
apt-get install lib32z1
亲测可用!
root@ubuntu:~/extract/sample# make
arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/mac/install/sysroots/eagle8074 -isystem/home/mac/install/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/arm-linux-gnueabihf/include -isystem/home/mac/install/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/arm-linux-gnueabihf/include -L/home/mac/install/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/arm-linux-gnueabihf/lib hello.c -o hello
arm-linux-gnueabihf-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
<builtin>: recipe for target 'hello' failed
make: *** [hello] Error 127
编译安装包时出现:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or direcory。
下载安装如下两个库,问题解决
sudo apt-get install libstdc++6
sudo apt-get install lib32stdc++6