Ubuntu 12.04 64bit 无法识别交叉编译器解决办法

  转自:http://blog.csdn.net/yimiyangguang1314/article/details/39996851

  感谢这位朋友!由于我在ubuntu 14 64bit的版本出现arm-none-linux-gnueabi-gcc命令无法识别。

最近在Ubuntu12.04 64Bit 系统安装交叉编译器,编译器安装好了,环境变量也设置OK了,在终端里面输入 arm-none-linux-gnueabi-gcc  系统却提示无法找到交叉编译器,Google一下,发现需要在64 Bit的Ubuntu安装32 Bit的 ia32-libs 库:

错误信息:

Html代码   收藏代码
  1. junior@mediacenter:~$ sudo apt-get install ia32-libs  
  2. Reading package lists... Done  
  3. Building dependency tree         
  4. Reading state information... Done  
  5. Some packages could not be installed. This may mean that you have  
  6. requested an impossible situation or if you are using the unstable  
  7. distribution that some required packages have not yet been created  
  8. or been moved out of Incoming.  
  9. The following information may help to resolve the situation:  
  10.   
  11. The following packages have unmet dependencies:  
  12.  ia32-libs : Depends: ia32-libs-multiarch  
  13. E: Unable to correct problems, you have held broken packages.  
  14.   
  15.   
  16. junior@mediacenter:~$ sudo apt-get install ia32-libs-multiarch  
  17. Reading package lists... Done  
  18. Building dependency tree         
  19. Reading state information... Done  
  20. Some packages could not be installed. This may mean that you have  
  21. requested an impossible situation or if you are using the unstable  
  22. distribution that some required packages have not yet been created  
  23. or been moved out of Incoming.  
  24. The following information may help to resolve the situation:  
  25.   
  26. The following packages have unmet dependencies:  
  27.  ia32-libs-multiarch:i386 : Depends: gstreamer0.10-plugins-good:i386 but it is not going to be installed  
  28.                             Depends: gtk2-engines:i386 but it is not going to be installed  
  29.                             Depends: gtk2-engines-murrine:i386 but it is not going to be installed  
  30.                             Depends: gtk2-engines-pixbuf:i386 but it is not going to be installed  
  31.                             Depends: gtk2-engines-oxygen:i386 but it is not going to be installed  
  32.                             Depends: ibus-gtk:i386 but it is not going to be installed  
  33.                             Depends: libcanberra-gtk-module:i386 but it is not going to be installed  
  34.                             Depends: libcurl3:i386 but it is not going to be installed  
  35.                             Depends: libgail-common:i386 but it is not going to be installed  
  36.                             Depends: libglapi-mesa:i386 but it is not going to be installed  
  37.                             Depends: libglu1-mesa:i386 but it is not going to be installed  
  38.                             Depends: libgtk2.0-0:i386 but it is not going to be installed  
  39.                             Depends: libqt4-opengl:i386 but it is not going to be installed  
  40.                             Depends: librsvg2-common:i386 but it is not going to be installed  
  41.                             Recommends: libgl1-mesa-glx:i386 but it is not going to be installed  
  42.                             Recommends: libgl1-mesa-dri:i386 but it is not going to be installed  
  43. E: Unable to correct problems, you have held broken packages.  

 

解决方法:

Since ia32-libs is now a transitional wrapper package around the set of multiarch-enabled libraries that were previously shipped bundled in ia32-libs, all of these library packages must be installable. In a released version of Ubuntu (such as in the precise and precise-updates pockets), packages will always be individually installable; however, multiarch imposes an additional restriction on installability: the library package must be at the exact same version across all architectures that you are installing it for.

In one of the examples given here, the libcairo-gobject2 package is implicated. This package has recently been updated for 12.04 as an SRU; which means that trying to install ia32-libs requires the amd64 version of libcairo-gobject2 on your system to match the i386 version that will be downloaded.

To ensure you're getting the correct versions of all library packages, do the following:

  1. Launch Update Manager
  2. Choose Settings at the bottom of the window
  3. Under Updates, make sure that Recommended Updates (precise-updates) is selected.
  4. Click Check to scan for any new software updates
  5. Click Install Updates to ensure your existing packages are all up to date

If you currently have a broken package installed which depends on ia32-libs, this may ask to remove it. You should proceed with the removal and reinstall once the operation is completed. You should then be able to run

sudo apt-get install ia32-libs

to install ia32-libs, or download package from http://packages.ubuntu.com/ and

sudo dpkg -i /path/to/package.deb

sudo apt-get -f install

to install your package and automatically pull in ia32-libs as a dependency.

Note that ia32-libs is considered deprecated in any case. For most software, you should instead install the i386 version of the package and let it directly pull the i386 libraries that it needs as dependencies, instead of using ia32-libs which is a catch-all.

 

执行系统更新后,我的Ubuntu12.04.2 版本升级到了Ubuntu12.04.5版本,通过执行 cat  /etc/issue命令可以看到系统已经升级成功:




再次执行:apt-get install  ia32-libs  命令,成功安装库文件,这时 arm-none-linux-gnueabi-gcc  命令也识别成功了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值