Ubuntu类似下面的安装包依赖问题:
libc6-dev : 依赖: libc6 (= 2.23-0ubuntu11) 但是 2.27-3ubuntu1 正要被安装
build-essential: 依赖: g++ (>= 4:4.3.1) 但是它将不会被安装
1.将原来的源文件备份
cd /etc/apt
mv sources.list sources.list.back
2.更换为阿里源
vim sources.list
将下面的阿里源复制粘贴进去
阿里源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb 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 main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
3.更新软件
apt-get update
apt-get upgrade