Ubuntu安装库 版本问题,错误E: Unable to correct problems, you have held broken packages.

一、问题描述:

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

该命令指定了安装的版本,从而实现了版本降级。再次安装即可。


相关推荐
Johny_Zhao16 分钟前
阿里云平台健康检查巡检清单-运维篇
linux·网络安全·阿里云·信息安全·云计算·shell·系统运维
来自于狂人29 分钟前
CentOS 镜像源配置与 EOL 后的应对策略
linux·运维·centos
博语小屋1 小时前
进程初识之进程状态
linux
吉凶以情迁2 小时前
window服务相关问题探索 go语言服务开发探索调试
linux·服务器·开发语言·网络·golang
Tipriest_2 小时前
通过filezilla在局域网下实现高速传输数据
ubuntu·数据传输·filezilla
柏木乃一3 小时前
Linux初步认识与指令与权限
linux·运维·服务器·shell·权限
Joemt3 小时前
ubuntu源码编译安装cmake高版本、pybind11安装、crow使用
linux·运维·ubuntu
huohuopro4 小时前
在linux(ubuntu)服务器上安装NTQQ并使用
linux·ubuntu
Jooolin4 小时前
Ubuntu?Centos?还是 redhat?Linux 系统选哪个?
linux·ubuntu·ai编程