g++ : 依赖: g++-5 (>= 5.3.1-3~) 但是它将不会被安装E: 无法修正错误

g++ : 依赖: g++-5 (>= 5.3.1-3~) 但是它将不会被安装E: 无法修正错误,第1张

g++ : 依赖: g++-5 (>= 5.3.1-3~) 但是它将不会被安装E: 无法修正错误

换源命令:sudo gedit sources.list
阿里源:

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/ bionic-updates 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 restricted universe multiverse

sudo apt-get install update

安装g++时出现依赖报错,可以通过换更新的源解决
笔者之前为了解决g++依赖的问题,卸载了apt安装了aptitude结果引来了一堆麻烦,重装系统好几次也没有解决。想不到换源就能解决,是我格局小了orz。欢迎讨论ovo

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5624555.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存