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

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


相关推荐
来一杯龙舌兰4 小时前
【Kubernetes】从零搭建K8s集群:虚拟机环境配置全指南(DNS/网络/防火墙/SELinux全解析一站式配置图文教程)
linux·网络·kubernetes
A.A呐5 小时前
【Linux第四章】gcc、makefile、git、GDB
linux·c语言·开发语言·c++·git
A-花开堪折6 小时前
01-驱动开发开篇
linux·嵌入式硬件
程序员JerrySUN8 小时前
Linux 内核同步管理全解:原理 + 实战 + 考点
linux·运维·服务器
大神的风范9 小时前
从0开始学linux韦东山教程Linux驱动入门实验班(1)
linux
dessler9 小时前
ZooKeeper-备份(Backup)
linux·运维·zookeeper
咖啡续命又一天10 小时前
Linux grep 命令
linux·运维
小高求学之路10 小时前
Centos 离线部署(MQTT)EMOX脚本并设置开机自启
linux·运维·centos
码农101号10 小时前
Linux中ansible模块补充和playbook讲解
linux·运维·ansible
运维技术分享与探索11 小时前
Centos7.6内网离线安装Docker环境和Portainer-博客
linux·运维·docker·容器·portainer