在使用ubuntu系统学习linux的过程中,运行sudo apt update报错:could not connect to security.ubuntu.com。国内极有可能出现这种情况,可将这个地址改换为国内镜像来避免此问题。
比如使用中科大的镜像来修改/etc/apt/sources.list文件,运行如下命令可直接替换:
sudo sed -i ‘s/security.ubuntu.com/mirrors.ustc.edu.cn/g’ /etc/apt/sources.list
最后再运行sudo apt update即可成功。
参考:mirrors.ustc.edu.cn/help/ubuntu.html
无法访问security.ubuntu.com解决方案
最新推荐文章于 2025-03-24 21:04:51 发布