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

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


相关推荐
Carlos_Xu36 分钟前
Linux基础-基础命令
linux
风曦Kisaki1 小时前
# Linux实战笔记-HIS项目实战Day01:版本控制与Git基础
linux·笔记·git
jsons12 小时前
rocky8内网离线批量补丁(你之前搭建的架构,多台服务器首选,无订阅)
linux·运维·服务器
阿拉斯攀登2 小时前
SPI 设备驱动开发
linux·驱动开发·嵌入式硬件·linux内核·嵌入式·linux驱动·spi
阿拉斯攀登2 小时前
定时器与延时:内核定时器、hrtimer 与延时函数
linux·嵌入式硬件·linux内核·嵌入式·linux驱动
zhou135284822672 小时前
Windows 配置 WSL (Ubuntu) 环境完整指南
linux·windows·ubuntu
FREEDOM_X3 小时前
Linux 进程间通讯(IPC)——总结
linux·c语言·前端·嵌入式硬件·struts
天空'之城3 小时前
Linux 系统编程 17:零拷贝技术全解
linux·嵌入式·零拷贝技术全解
网络小白不怕黑3 小时前
11.虚拟机模拟路由器实验
linux·运维·服务器·网络
Mapleay3 小时前
Linux 内核编程基础
linux·运维·服务器