Nano的镜像默认是国外的源,速度很慢,国内的源有的上不去,有的包无法安装,经过测试清华大学的源完美可用,现放上教程
首先备份原本的文件
sudo cp /etc/apt/ /etc/apt/ #为防止误操作后无法恢复,先备份原文件
sudo gedit /etc/apt/
然后删除所有内容,复制
deb /ubuntu-ports/ bionic main multiverse restricted universe
deb /ubuntu-ports/ bionic-security main multiverse restricted universe
deb /ubuntu-ports/ bionic-updates main multiverse restricted universe
deb /ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src /ubuntu-ports/ bionic main multiverse restricted universe
deb-src /ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src /ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src /ubuntu-ports/ bionic-backports main multiverse restricted universe
到后保存,之后打开终端输入
sudo apt-get update
就可以了。