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

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


相关推荐
Hey小孩12 分钟前
[个人总结] LDD3:3.字符驱动 - scull(4)
linux·驱动开发
陈让然13 分钟前
VS Code新版本无法连接WSL ubuntu18.04
linux·运维·ubuntu
oMcLin15 分钟前
如何在Oracle Linux 8.4上通过配置Oracle RAC集群,确保企业级数据库的高可用性与负载均衡?
linux·数据库·oracle
小杰帅气17 分钟前
神秘的环境变量和进程地址空间
linux·运维·服务器
Vect__17 分钟前
基于CSAPP对链接和库的理解
linux
胖咕噜的稞达鸭19 分钟前
进程间的通信(1)(理解管道特性,匿名命名管道,进程池,systeam V共享内存是什么及优势)重点理解代码!
linux·运维·服务器·数据库
Coder个人博客20 分钟前
Linux6.19-ARM64 boot Makefile子模块深入分析
linux·车载系统·系统架构·系统安全·鸿蒙系统
知识分享小能手25 分钟前
Ubuntu入门学习教程,从入门到精通,Ubuntu 22.04中的人工智能—— 知识点详解 (25)
人工智能·学习·ubuntu
可爱又迷人的反派角色“yang”33 分钟前
k8s(五)
linux·运维·docker·云原生·容器·kubernetes
oMcLin34 分钟前
如何在Ubuntu 22.10上通过配置K3s轻量级Kubernetes集群,提升边缘计算环境的资源管理能力?
ubuntu·kubernetes·边缘计算