从 14.04 更新至 16.04 时出错

从 14.04 更新至 16.04 时出错

注意到新的 LTS 已经发布并弹出通知,但是当我尝试升级时出现以下信息:

W:Failed to fetch http://ports.ubuntu.com/dists/xenial/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.150 80]
W:Failed to fetch http://ports.ubuntu.com/dists/xenial/restricted/binary-amd64/Packages  404  Not Found [IP: 91.189.88.150 80]
W:Failed to fetch http://ports.ubuntu.com/dists/xenial/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
W:Failed to fetch http://ports.ubuntu.com/dists/xenial/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E:Some index files failed to download. They have been ignored, or old ones used instead.

然后,当我点击“关闭”时,它会恢复所做的所有更改。我将更新服务器设置为“主服务器”。我们的互联网连接很稳定

简洁sources.list:(我删除了双重注释行)

# deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted

deb http://archive.ubuntu.com/ubuntu xenial main restricted
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted
deb http://archive.ubuntu.com/ubuntu xenial universe
deb http://archive.ubuntu.com/ubuntu xenial-updates universe
deb http://archive.ubuntu.com/ubuntu xenial multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted
deb http://archive.ubuntu.com/ubuntu xenial-security universe
deb http://archive.ubuntu.com/ubuntu xenial-security multiverse
deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu trusty partner
# deb http://download.ebz.epson.net/dsc/op/stable/debian/ lsb3.2 main # disabled on upgrade to xenial
deb http://ports.ubuntu.com/ xenial main restricted
deb-src http://ports.ubuntu.com/ xenial-security main restricted

谢谢!

答案1

您可以尝试以下操作:在终端中输入以下命令

sudo rm /var/lib/apt/lists/* -vf

然后:

sudo apt-get update

第一个命令将删除您的本地 repo 缓存(有时它们似乎会陷入不一致的状态)并且 apt-get update 将从源刷新整个内容。

相关内容