64位Ubuntu下使用arm-linux-gcc交叉编译器

arm-linux-gcc是用于交叉编译ARM平台上Linux程序的编译器,在32位的宿主Linux计算机上运行时是正常的,但是在我的64位Linux发行版Ubuntu系统上却无法运行,报错:

/usr/local/arm/4.3.3/bin/arm-linux-gcc: 3: /usr/local/arm/4.3.3/bin/arm-linux-gcc: arm-none-linux-gnueabi-gcc: not found

我寻思之前在32位的Ubuntu系统上是正常运行的,怎么在64位Ubuntu上就不能运行呢,我又猜了一下可能的原因:64位系统没有32位系统的库,所以需要安装32位兼容库:

sudo apt-get install ia32-libs
但是安装的时候出现下面的提示:

root@ubuntu:/mnt/hgfs/vmshare/examples/leds# apt-get install ia32-libs
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:
  lib32ncurses5 lib32z1

E: Package 'ia32-libs' has no installation candidate
根据提示就安装了lib32ncurses5和lib32z1库,安装完毕之后再次运行arm-linux-gcc就可以运行了:

root@ubuntu:/mnt/hgfs/vmshare/examples/leds# make
arm-linux-gcc -o led led.c
root@ubuntu:/mnt/hgfs/vmshare/examples/leds# ls
led  led.c  Makefile


  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值