这是自己亲身经历的一个问题:在正确配置了arm-none-linux-gnueabi-gcc环境变量之后,终端输入arm-none-linux-gnueabi-gcc --version:
bash: /home/lin/kernel/arm-2010q1/bin/arm-none-linux-gnueabi-gcc: No such file or directory
然后你写一个helloworld.c都无法编译,可是他明明在那里,是不是很奇葩?!
百度后发现是32位和64位不兼容,需要安装32位兼容库。我的系统是64位的Ubuntu。
好了,问题的解决点就在我用的是64位系统,别人又说,使用 sudo apt-get install ia32-libs命令就可以解决。然而安装之后,是这样:
E: Package 'ia32-libs' has no installation candidate
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
这个时候,只要再去安装上面的lib32z1 lib32ncurses5 lib32bz2-1.0 这几个库就好了:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
解决完毕!