常见报错信息如下:
make:arm-linux-gnueabihf-gcc: Command not found
bash: arm-linux-gnueabihf-gcc: No such file or directory
安装 32 位编译支持
sudo apt-get install lib32ncurses6 # 或 lib32ncurses5
sudo apt-get install lib32z1
sudo apt-get install lib32stdc++6
测试方法:先 source 环境变量,执行命令
arm-linux-gnueabihf-g++ -v
结果如下,显示版本信息即可。
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=……
Target: arm-linux-gnueabihf
Configured with: ……
Thread model: posix
gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)