错误消息:
# 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.
我看到有一篇文章提到修改/var/lib/dpkg/status
,将=
更改为=>
来解决此问题。但是它没有提到细节。
如果您有任何想法,请分享。
答案 0 :(得分:0)
如果您确实需要gcc 4.9,建议您从here下载Linaro工具链。否则,您可以下载更新的7.4.1版本here,或从here下载最新的8.3版本。
这应该避免您遇到软件包依赖性问题,并为您提供使用更广泛/维护更广泛的工具链。
例如:
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.
如果目标确实支持硬件浮点,则需要安装arm-linux-gnueabihf
而不是arm-linux-gnueabi
。