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 /ubuntu/ trusty main restricted universe multiverse
deb /ubuntu/ trusty-security main restricted universe multiverse
deb /ubuntu/ trusty-updates main restricted universe multiverse
deb /ubuntu/ trusty-proposed main restricted universe multiverse
deb /ubuntu/ trusty-backports main restricted universe multiverse
deb-src /ubuntu/ trusty main restricted universe multiverse
deb-src /ubuntu/ trusty-security main restricted universe multiverse
deb-src /ubuntu/ trusty-updates main restricted universe multiverse
deb-src /ubuntu/ trusty-proposed main restricted universe multiverse
deb-src /ubuntu/ trusty-backports main restricted universe multiverse
focal
deb / focal main restricted
deb / focal-updates main restricted
deb / focal universe
deb / focal-updates universe
deb / focal multiverse
deb / focal-updates multiverse
deb / focal-backports main restricted universe multiverse
deb / focal-security main restricted
deb / focal-security universe
deb / focal-security multiverse
bionic
deb /ubuntu/ bionic main restricted universe multiverse
deb-src /ubuntu/ bionic main restricted universe multiverse
deb /ubuntu/ bionic-security main restricted universe multiverse
deb-src /ubuntu/ bionic-security main restricted universe multiverse
deb /ubuntu/ bionicupdates main restricted universe multiverse
deb-src /ubuntu/ bionic-updates main restricted universe multiverse
deb /ubuntu/ bionic-proposed main restricted universe multiverse
deb-src /ubuntu/ bionic-proposed main restricted universe multiverse
deb /ubuntu/ bionic-backports main restricted universe multiverse
deb-src /ubuntu/ bionic-backports main rstricted universe multiverse
4、版本代号分布
参考自 博客
(/jhsword/article/details/96853061)
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 /ubuntu/ trusty main restricted universe multiverse
deb /ubuntu/ trusty-security main restricted universe multiverse
deb /ubuntu/ trusty-updates main restricted universe multiverse
deb /ubuntu/ trusty-proposed main restricted universe multiverse
deb /ubuntu/ trusty-backports main restricted universe multiverse
deb-src /ubuntu/ trusty main restricted universe multiverse
deb-src /ubuntu/ trusty-security main restricted universe multiverse
deb-src /ubuntu/ trusty-updates main restricted universe multiverse
deb-src /ubuntu/ trusty-proposed main restricted universe multiverse
deb-src /ubuntu/ trusty-backports main restricted universe multiverse
focal
deb / focal main restricted
deb / focal-updates main restricted
deb / focal universe
deb / focal-updates universe
deb / focal multiverse
deb / focal-updates multiverse
deb / focal-backports main restricted universe multiverse
deb / focal-security main restricted
deb / focal-security universe
deb / focal-security multiverse
bionic
deb /ubuntu/ bionic main restricted universe multiverse
deb-src /ubuntu/ bionic main restricted universe multiverse
deb /ubuntu/ bionic-security main restricted universe multiverse
deb-src /ubuntu/ bionic-security main restricted universe multiverse
deb /ubuntu/ bionicupdates main restricted universe multiverse
deb-src /ubuntu/ bionic-updates main restricted universe multiverse
deb /ubuntu/ bionic-proposed main restricted universe multiverse
deb-src /ubuntu/ bionic-proposed main restricted universe multiverse
deb /ubuntu/ bionic-backports main restricted universe multiverse
deb-src /ubuntu/ bionic-backports main rstricted universe multiverse
4、版本代号分布
参考自 博客
(/jhsword/article/details/96853061)