交叉编译器环境变量配置正确了,但是无法使用

这是自己亲身经历的一个问题:在正确配置了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 
解决完毕!
 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值