我有一个安装了Lucid Server (10.04)的服务器,并且我想将镜像从美国(或其他任何国家)更改为主要的Ubuntu镜像。
例如,我的sources.list文件中的前两个条目是:
在桌面环境中,我会像这样选择主镜像:
例如,我的sources.list文件中的前两个条目是:
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
在桌面环境中,我会像这样选择主镜像:
apt-get update
以便APT可以更新其软件包。最初我收到了一个“Package X has no installation candidate”的消息,因为APT尚未扫描新的软件库以获取软件包。 - dutoitnssed
命令:sed -E -i 's#http://[^\s]*archive\.ubuntu\.com/ubuntu#http://be.archive.ubuntu.com/ubuntu#g' /etc/apt/sources.list'
将/etc/apt/sources.list中的nl替换为您的国家代码。 - Mandy Schoepsed -E -i 's#http://[a-z]*archive\.ubuntu\.com/ubuntu#http://be.archive.ubuntu.com/ubuntu#g' /etc/apt/sources.list'
(或者去掉be.
前缀/使用自定义前缀,问题在于前缀的正则表达式)。 - polynomial_donut