security.ubuntu.com 无法连接
在运行 suda apt-get update 时,反馈 security.ubuntu.com无法连接的问题:
这是因为Ubuntu 默认使用 security.ubuntu.com
,这个源在中国大陆经常连接超时。你可以把它换成 阿里云、中科大、清华镜像。
以下是替换命令(适用于 Ubuntu 20.04):
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak # 先备份
sudo sed -i 's|http://.*.ubuntu.com|http://mirrors.aliyun.com|g' /etc/apt/sources.list
然后再执行更新:
sudo apt-get update
发现更新可以正常进行,特此记录。