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

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


相关推荐
Moshow郑锴1 小时前
Ubuntu 26.04 中文输入法 : fcitx5+Rime中州韵引擎
linux·运维·ubuntu
qq_163135752 小时前
Linux 【04-more命令超详细教程】
linux
sevencheng7983 小时前
【ADB】adb命令行常用按键模拟代码
linux·adb·模拟按键,返回键,音量键
暗影天帝3 小时前
BPI-R3 Mini 刷 Yuzhii DHCPD U-Boot 教程
linux
小赖同学啊4 小时前
智能连接器集群化高可用生产方案
linux·运维·人工智能
Cinema KI4 小时前
Linux第一个系统程序-进度条
linux·服务器
Moshow郑锴4 小时前
Ubuntu 26.04 更换阿里云源镜像
linux·运维·ubuntu
Jason_chen5 小时前
Linux 6.2 串口机制深度解析:AI驱动的自适应通信与零信任串口安全架构
linux
ShineWinsu5 小时前
对于Linux:线程概念与分页存储管理的解析
linux·运维·服务器·面试·线程·进程·虚拟空间地址
用户3946235365246 小时前
Uboot - DM框架
linux