无法使用 apt-get 连接到 Linux 更新服务器

无法使用 apt-get 连接到 Linux 更新服务器

我在 VirtualBox 中运行 Lubuntu 15.04,突然当我使用命令时,apt-get它无法连接到我用于下载的服务器(ubuntuarchive.mirror.nac.net)。这个问题已经持续了好几天,但我之前能够通过安装sudo apt-get。有什么建议吗?

我尝试运行时收到的错误消息sudo apt-get update是每个包的版本:

Failed to fetch http://ubuntuarchive.mirror.nac.net/dists/wily/Release.gpg Unable to connect to ubuntuarchive.mirror.nac.net:http:

截屏

答案1

很可能这个镜像已经死了。这是有道理的,因为 Ubuntu 15.102016 年 7 月 28 日停产。意味着不再有补丁和升级。您最好和最可靠的选择是迁移到 Ubuntu 的 LTS,例如 Ubuntu 16.04;或者在您的情况下是 Lubuntu 16.04。

但是如果你想要获得最后一轮补丁,你可以将你的更改sources.list为指向 Ubuntuold-releases档案。说明可以在这里找到

sources.list首先,像这样备份:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.BACKUP

sources.list然后像这样打开你的文件:

sudo nano /etc/apt/sources.list

并将内容替换为以下内容:

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ wily main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ wily-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse

# Optional
#deb http://old-releases.ubuntu.com/ubuntu/ wily-backports main restricted universe multiverse

然后update像这样运行:

sudo apt-get update

当这些都完成后,你就应该以某种方式做好准备了。

但老实说,您应该升级到 16.04 LTS 才能摆脱这种困境。

相关内容