最近在Ubuntu12.04 64Bit 系统安装交叉编译器,编译器安装好了,环境变量也设置OK了,在终端里面输入 arm-none-linux-gnueabi-gcc 系统却提示无法找到交叉编译器,Google一下,发现需要在64 Bit的Ubuntu安装32 Bit的 ia32-libs 库:
错误信息:
- junior@mediacenter:~$ sudo apt-get install ia32-libs
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- Some packages could not be installed. This may mean that you have
- requested an impossible situation or if you are using the unstable
- distribution that some required packages have not yet been created
- or been moved out of Incoming.
- The following information may help to resolve the situation:
-
- The following packages have unmet dependencies:
- ia32-libs : Depends: ia32-libs-multiarch
- E: Unable to correct problems, you have held broken packages.
-
-
- junior@mediacenter:~$ sudo apt-get install ia32-libs-multiarch
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- Some packages could not be installed. This may mean that you have
- requested an impossible situation or if you are using the unstable
- distribution that some required packages have not yet been created
- or been moved out of Incoming.
- The following information may help to resolve the situation:
-
- The following packages have unmet dependencies:
- ia32-libs-multiarch:i386 : Depends: gstreamer0.10-plugins-good:i386 but it is not going to be installed
- Depends: gtk2-engines:i386 but it is not going to be installed
- Depends: gtk2-engines-murrine:i386 but it is not going to be installed
- Depends: gtk2-engines-pixbuf:i386 but it is not going to be installed
- Depends: gtk2-engines-oxygen:i386 but it is not going to be installed
- Depends: ibus-gtk:i386 but it is not going to be installed
- Depends: libcanberra-gtk-module:i386 but it is not going to be installed
- Depends: libcurl3:i386 but it is not going to be installed
- Depends: libgail-common:i386 but it is not going to be installed
- Depends: libglapi-mesa:i386 but it is not going to be installed
- Depends: libglu1-mesa:i386 but it is not going to be installed
- Depends: libgtk2.0-0:i386 but it is not going to be installed
- Depends: libqt4-opengl:i386 but it is not going to be installed
- Depends: librsvg2-common:i386 but it is not going to be installed
- Recommends: libgl1-mesa-glx:i386 but it is not going to be installed
- Recommends: libgl1-mesa-dri:i386 but it is not going to be installed
- 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:
- Launch Update Manager
- Choose Settings at the bottom of the window
- Under Updates, make sure that Recommended Updates (precise-updates) is selected.
- Click Check to scan for any new software updates
- 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 命令也识别成功了。