美文网首页
make失败,提示:gcc-version.sh line 25

make失败,提示:gcc-version.sh line 25

作者: 小田BSP | 来源:发表于2021-06-12 17:35 被阅读0次

前段时间Ubuntu 18.04系统挂了,重装系统后,一直没有安装编译环境,记录下编译时遇到的一些问题。

1、问题描述

编译Linux内核映像时报如下错误:

root@ubuntu:/home/run/code/linux-4.9.y# make ARCH=arm CROSS_COMPILE=arm-xx-linux- defconfig
#
# configuration written to .config
#
root@ubuntu:/home/run/code/linux-4.9.y# make ARCH=arm CROSS_COMPILE=arm-xx-linux- uImage
./scripts/gcc-version.sh: line 25: /opt/bin/arm-xx-linux-gcc: No such file or directory
./scripts/gcc-version.sh: line 26: /opt/bin/arm-xx-linux-gcc: No such file or directory

make: /opt/bin/arm-xx-linux-gcc: Command not found
make: /opt/bin/arm-xx-linux-gcc: Command not found
scripts/kconfig/conf  --silentoldconfig Kconfig
./scripts/gcc-version.sh: line 25: /opt/bin/arm-xx-linux-gcc: No such file or directory
./scripts/gcc-version.sh: line 26: /opt/bin/arm-xx-linux-gcc: No such file or directory
make: /opt/bin/arm-xx-linux-gcc: Command not found
make: /opt/bin/arm-xx-linux-gcc: Command not found
  CHK     include/config/kernel.release
make: /opt/bin/arm-xx-linux-gcc: Command not found
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
Makefile:1066: recipe for target 'prepare-compiler-check' failed
make: *** [prepare-compiler-check] Error 1

2、解决方法

ubuntu 180.04是64位,而交叉编译器是32位的,需要安装软件包lib32ncurses5

root@ubuntu:/home/run/code/linux-4.9.y# apt-get install lib32ncurses5 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
...
root@ubuntu:/home/run/code/linux-4.9.y# 

相关文章

网友评论

      本文标题:make失败,提示:gcc-version.sh line 25

      本文链接:https://www.haomeiwen.com/subject/lnjieltx.html