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

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


相关推荐
liuyunluoxiao14 分钟前
进程间通信--共享内存【Linux操作系统】
linux
qq_4541757931 分钟前
gcc/g++常用参数
linux·运维·服务器
wb1892 小时前
Linux远程连接服务
linux·运维·服务器·笔记
Jerry&Louis2 小时前
【Ubuntu】Waydroid-Linux安卓模拟器安装
linux·ubuntu
yangpan0112 小时前
ubuntu 24.04安装ros1 noetic
linux·运维·ubuntu
星卯教育tony2 小时前
ubuntu 20.04 更改国内镜像源-阿里源 确保可用
linux·运维·ubuntu
卡戎-caryon2 小时前
【C++】15.并发支持库
java·linux·开发语言·c++·多线程
weixin_434255613 小时前
命令行快速上传文件到SFTP服务器(附参考示例)
linux·运维·服务器
麟城Lincoln3 小时前
【Linux笔记】nfs网络文件系统与autofs(nfsdata、autofs、autofs.conf、auto.master)
linux·网络·笔记·nfs·autofs
***似水流年***4 小时前
Linux任务管理与守护进程
linux·运维·服务器