apt install build-essential出现软件包有未满足的依赖

一、前言

今天使用apt install build-essential 时出现了以下错误,想想dpkg-dev,这个包管理器,应该是系统自带的包管理工具吧,怎么可能不满足。所以对网络进行了地毯式的搜索,终于发现了问题。
在这里插入图片描述

二、出现原因

原因在于 /etc/apt/source.list 文件,因为国外源网速慢,所以之前配置了apt国内源,当时是随便找了一个源就写进去了,这就埋下了病根,源头就是这里,我添加了不符合我的ubuntu版本的国内阿里云的软件源。所以

三、我的解决方案

上网搜索符合自己Ubuntu版本的国内源,然后替换已经写入文件的其他版本的国内源。于是搞定了。如果没有搞定,请务灰心,总会解决的。

四、附

1、查看自己的系统版本

cat /proc/version

如下图是我的版本,于是就去搜索版本号加国内源,就会出现一大堆。
在这里插入图片描述

2、apt update的暗示

加粗样式

3、阿里源

trusty

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

focal

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse  

bionic

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionicupdates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main rstricted universe multiverse

4、版本代号分布

参考自 博客
(https://blog.csdn.net/jhsword/article/details/96853061)
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章