1、已经安装了交叉编译环境,并且/etc/profile里面也有记录编译器的环境变量,但是编译时还是提示bash:arm-hisiv100nptl-linux-gcc未找到。
这个的解决方案为:在/etc/bashrc文件里面添加编译器的路径。然后source /etc/bashrc.
出现问题的原因应该是/etc/profile里面的环境变量是对应所有用户的,并且第一次登陆的时候读取。/etc/bashrc里面是用户使用bash的时候读取的环境变量。应该要更新
这个文件执行bash命令时才能找到。
2、出现如下错误:
"mkimage" command not found - U-Boot images will not be built
make[2]: *** [arch/arm/boot/uImage] Error 1
make[1]: *** [uImage] Error 2
很明显是mkimage这个东西找不到。
先说下下mkimage这个东西,它会在uboot源码的/tools路径下存在(需要先编译uboot源码),它可以用来制作压缩的或是不压缩的内核镜像文件。
解决方法:
1.把uboot/tools路径加入到环境变量中(不推荐)
2.把uboot/tools下的mkimage拷贝到/usr/bin路径下即可。
3、编译文件系统的时候出现/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory:
是因为64位
系统中安装了32位程序
解决方法:
yum install glibc.i686
重新安装以后还有如下类系错误 再继续安装包
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
yum install libstdc++.so.6
还有如下类系错误 再继续安装包
error while loading shared libraries: libz.so.1:
cannot open shared object file: No such file or directory
yum install zlib.i686