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

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


相关推荐
初願致夕霞17 分钟前
基于系统调用的Linux网络编程——UDP与TCP
linux·网络·c++·tcp/ip·udp
charlie1145141913 小时前
嵌入式Linux驱动开发——新 API 字符设备驱动完整教程 - 从设备结构体到应用测试
linux·运维·驱动开发
消失的旧时光-19433 小时前
C语言对象模型系列(四)《Linux 内核里的 container_of 到底是什么黑魔法?》—— 一篇讲透 Linux 内核的“对象模型”核心技巧
linux·c语言·算法
SWAGGY..4 小时前
Linux系统编程:(二)基础指令详解
linux·运维·服务器
kdxiaojie4 小时前
U-Boot分析【学习笔记】(3)
linux·笔记·学习
烛衔溟4 小时前
TypeScript 接口继承与混合类型
linux·ubuntu·typescript
蜡笔婧萱5 小时前
Linux--远程登录服务ssh
linux·服务器·ssh
伏加特遇上西柚5 小时前
Loki+Alloy+Grafana日志采集部署
java·linux·服务器·spring boot·grafana·prometheus
资源分享助手5 小时前
三网H5小游戏战车向前冲搭建教程(Win+Linux)
linux·运维·服务器
黑白园6 小时前
Linux i2c驱动初探(一)待补充
linux