Ubuntu类似下面的安装包依赖问题:
libc6-dev : 依赖: libc6 (= 2.23-0ubuntu11) 但是 2.27-3ubuntu1 正要被安装
build-essential: 依赖: g++ (>= 4:4.3.1) 但是它将不会被安装
解决方法:
1.备份原来的文件
cd /etc/apt
sudo mv sources.list sources.list.back
2.更换为阿里源
sudo 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. 更新软件
sudo apt-get update
sudo apt-get upgrade