一、问题描述:
Ubuntu系统指令安装 :
sudo apt install -y build-essential
提示:
Reading package lists... Done
Building dependency tree... Done
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 createdor been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.35-0ubuntu3.7 is to be installed
E: Unable to correct problems, you have held broken packages.
可以看到提示
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.6) but 2.35-0ubuntu3.7 is to be installed
需要的版本低,安装的版本高,需要降低版本。
二、解决办法
解决办法:
sudo apt install libc6=2.35-0ubuntu3.6
该命令指定了安装的版本,从而实现了版本降级。再次安装即可。