备份 /etc/apt/sources.list 文件
执行命令 sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
打开 /etc/apt/sources.list 文件,删除文件原有内容,再复制粘贴 阿里的源 (网易、清华都可以)
打开文件 sudo vim /etc/apt/sources.list
复制阿里源
deb bionic main restricted universe multiverse
deb-src bionic main restricted universe multiverse
deb bionic-security main restricted universe multiverse
deb-src bionic-security main restricted universe multiverse
deb bionic-updates main restricted universe multiverse
deb-src bionic-updates main restricted universe multiverse
deb bionic-proposed main restricted universe multiverse
deb-src bionic-proposed main restricted universe multiverse
deb bionic-backports main restricted universe multiverse
deb-src bionic-backports main restricted universe multiverse
重新获取软件包列表
sudo apt-get update
在执行安装命令
sudo apt-get install [XXX]
方法二
软件和更新
Ubuntu软件--> 下载自 ---> 其他站点 ---> 中国 mirrors.aliyun.com
执行 sudo apt-get update 命令
在执行安装命令
sudo apt-get install [XXX]
阅读(585) | 评论(0) | 转发(0) |