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

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


相关推荐
java_logo6 小时前
MySQL Server Docker 容器化部署指南
linux·运维·数据库·docker·容器
誰能久伴不乏7 小时前
Linux文件套接字AF_UNIX
linux·服务器·c语言·c++·unix
a41324477 小时前
如何解决centos上oracle连接问题
linux·oracle·centos
h***34637 小时前
在linux(Centos)中Mysql的端口修改保姆级教程
linux·mysql·centos
星释7 小时前
Rust 练习册 97:Run-Length Encoding 压缩算法
java·linux·rust
2509_940880227 小时前
Linux(CentOS)安装 MySQL
linux·mysql·centos
可爱又迷人的反派角色“yang”7 小时前
LVS+Keepalived群集
linux·运维·服务器·前端·nginx·lvs
n***27197 小时前
【MySQL数据库】Ubuntu下的mysql
数据库·mysql·ubuntu
Nerd Nirvana7 小时前
15个提升开发效率的VS Code插件推荐
linux·vscode·开发工具·嵌入式软件开发·插件使用·智能采集设备·边缘终端