樹莓派 Ubuntu 20.04 安裝 gcc-arm-linux-gnueabihf 交叉編譯器報錯:
summergao@ubuntu:~/Workspace/LinuxWorkSpace/tool$ sudo apt install gcc-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:
binutils-arm-linux-gnueabihf : Depends: binutils-common (= 2.34-6ubuntu1.1) but 2.35.1-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
解決辦法:
先卸載 binutils-common
sudo apt-get remove binutils-common
再重新安裝 binutils-common
sudo apt-get install binutils-common
重新安裝 gcc-arm-linux-gnueabihf
sudo apt-get install gcc-arm-linux-gnueabihf
驗證安裝
arm-linux-gnueabihf-gcc -v