试过阿里云源,效果不好gcc安装失败,安装其他包时会出现包损坏的error,
更换网易163源后没问题
内容引自:https://www.cnblogs.com/zqifa/p/12910989.html
第一步:备份源文件:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
第二步:编辑/etc/apt/sources.list文件
在文件最前面添加以下条目(操作前请做好相应备份):
vi /etc/apt/sources.list
网易163源
deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
第三步:执行更新命令:
sudo apt-get update
sudo apt-get upgrade