Advertisement

Ubuntu 安装 g++ 提示:g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed

阅读量:

由于Ubuntu的软件源版本过旧或无法访问,可通过更新源的方式加以解决。

将阿里云源设置为Ubuntu 18.04系统的默认源

首先对/etc/apt/sources.list文件进行备份操作
#执行备份
cp /etc/apt/sources.list /etc/apt/sources.list.bak

随后在/etc/apt/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/ub

全部评论 (0)

还没有任何评论哟~