简体   繁体   中英

install arm-gcc 4.9 version in debian

Error message:

# apt-get install gcc-4.9-arm-linux-gnueabihf
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:
 gcc-4.9-arm-linux-gnueabihf : Depends: libgcc-4.9-dev:armhf (= 4.9.2-10) but 4.9.2-10+deb8u1 is to be installed
E: Unable to correct problems, you have held broken packages.

I have seen an article said that modifies /var/lib/dpkg/status , changes = to => to fix this. But it didn't mention the details. If you have any idea please share it.

Ref: https://wiki.debian.org/CrossToolchains#Installation

I would suggest to download a Linaro toolchain from here , if you really need a gcc 4.9. If not, you may download a more recent 7.4.1 version here , or the latest 8.3 from here .

This should avoid you running into package dependency issues, and provide you with more widely used/maintained toolchains.

For example:

wget https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabi/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz
sudo tar Jxf gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz -C /opt
PATH=/opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi/bin:$PATH

arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Linaro GCC 4.9-2017.01) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If your target does have support for hardware floating point, you need to install arm-linux-gnueabihf instead of arm-linux-gnueabi .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM