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

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


相关推荐
三言老师7 分钟前
ss高效查看网络连接端口实操
linux·运维·服务器·网络
三言老师9 分钟前
traceroute路由追踪实操
linux·运维·服务器·网络
我是小灰灰吖25 分钟前
Ubuntu 22.04 切换为 X11 会话以解决 QT 桌面程序兼容性问题
linux·qt·ubuntu
荒--34 分钟前
kali 操作基础(二)
linux·网络
XH华38 分钟前
Linux系统第四章:工具的学习
linux·运维·学习
鬼手点金39 分钟前
Hermes‑Agent 使用教程
python·ubuntu·powershell·cmd·ai agent·opencode·hermes
刚入门的大一新生1 小时前
Linux-基础开发工具1
linux·运维·服务器
桑榆4162 小时前
WebRTC 本地视频文件推流 Demo 搭建指南 (Ubuntu 24.04)
linux·ubuntu·webrtc
meilindehuzi_a2 小时前
深入理解 Linux 进程地址空间:从虚拟内存、页表映射到 fork 写时拷贝与 VMA 管理
java·linux·服务器
z20348315202 小时前
Ubuntu双系统安装指南:从 UEFI 原理到 Ubuntu 分区方案的全面解析
linux·运维·ubuntu