树莓派 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