在Ubuntu 16.04上升级时出错


10

当我尝试升级计算机上的软件sudo apt-get upgrade时,发生以下错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libpam-systemd libsystemd0 libudev1 systemd systemd-sysv udev
6 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
Need to get 5,051 kB of archives.
After this operation, 62.5 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd-sysv amd64 229-4ubuntu11
  404  Not Found [IP: 141.76.1.200 80]
Err:2 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpam-systemd amd64 229-4ubuntu11
  404  Not Found [IP: 141.76.1.200 80]
Err:3 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsystemd0 amd64 229-4ubuntu11
  404  Not Found [IP: 141.76.1.200 80]
Err:4 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd amd64 229-4ubuntu11
  404  Not Found [IP: 141.76.1.200 80]
Err:5 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 udev amd64 229-4ubuntu11
  404  Not Found [IP: 141.76.1.200 80]
Err:6 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev1 amd64 229-4ubuntu11
  404  Not Found [IP: 141.76.1.200 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd-sysv_229-4ubuntu11_amd64.deb  404  Not Found [IP: 141.76.1.200 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libpam-systemd_229-4ubuntu11_amd64.deb  404  Not Found [IP: 141.76.1.200 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libsystemd0_229-4ubuntu11_amd64.deb  404  Not Found [IP: 141.76.1.200 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd_229-4ubuntu11_amd64.deb  404  Not Found [IP: 141.76.1.200 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/pool/main/s/systemd/udev_229-4ubuntu11_amd64.deb  404  Not Found [IP: 141.76.1.200 80]
E: Failed to fetch http://de.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-4ubuntu11_amd64.deb  404  Not Found [IP: 141.76.1.200 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我的sources.list样子

# deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted    
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted    

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted    

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe    

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse    

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse    

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse    

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner    

# deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/ # disabled on upgrade to xenial
# deb http://cran.rstudio.com/bin/linux/ubuntu trusty/ # disabled on upgrade to xenial    

deb http://deb.torproject.org/torproject.org xenial main
deb-src http://deb.torproject.org/torproject.org xenial main
deb [arch=armhf] http://linux-packages.resilio.com/resilio-sync/deb 
resilio-sync non-free

我尝试运行两个推荐的解决方案,但它们也不能解决问题。我试图搜索问题,但找不到类似的东西。


您可以发布您的/etc/apt/sources.list吗?
Dr_Bunsen '17

软件包文件很可能尚未同步到镜像(传输文件需要花费很多时间!)。一个小时后再试一次。
fkraiem

1
我认为时间不影响问题。我一周前第一次尝试,但仍然遇到上述问题。
所以S

Answers:


17

我猜您的软件包管理器列表中的软件包和缓存已过时。

但为什么?

您正在使用xenial,您尝试访问的软件包之一是libpam-systemd,您的pkg管理器尝试从此处获取:

http://de.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libpam-systemd_229-4ubuntu11_amd64.deb

哪个服务器用404响应您,这意味着它不存在。

如果检查主存储库,您会发现它也不在那里。

如果你搜索libpam-systemdxenial-updates部分在Ubuntu的软件包。当您尝试达到229-4ubuntu11时,结果将是229-4ubuntu16,另一件事是您选择的存储库中提供了此新版本。在这里

该怎么办?

更新您的清单:

sudo apt update

它应该为您完成工作。

但是,如果在更新列表后仍然存在问题,请尝试删除这些文件,然后再次运行以上命令:

sudo rm /var/lib/apt/lists/*
sudo rm /var/cache/apt/*.bin

这看起来像它解决了错误。我不确定,但sudo apt upgrade现在什么也没做。谢谢您的帮助。
所以S

@SoS,不客气,很高兴它对您有所帮助;)
Ravexina

就我而言,这是在Amazon AWS上启动一个全新的空Ubuntu 16.04映像时发生的。似乎sudo apt update必须运行以使其更新。
Eneko Alonso
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.