无法连接上security.ubuntu.com:80
问题
执行sudo apt-get update时显示
无法连接上 security.ubuntu.com:80 (::)。 - connect (111: 连接被拒绝) 无法连接上 security.ubuntu.com:80 (124.236.16.201),连接超时
解决
备份sources.list文件
sudo cp /etc/apt/sources.list /etc/apt/sources_default.list
编辑sources.list文件
sudo gedit /etc/apt/sources.list
将原有内容删除,复制以下内容并保存,或者找到清华大学开源软件镜像站复制也可以
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
更换服务器
若是图形界面,则找到软件和更新工具,找到下载自,将主服务器更换为位于中国的服务器
重新启动后
执行sudo apt-get update即可