在 xenial 上更新 python 2.7.12 时出错

在 xenial 上更新 python 2.7.12 时出错

我做了以下操作,但仍然无法将 python2 更新到最新版本

sudo apt 更新

apt 列表--可升级

Listing... Done
libpython2.7/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 amd64 [upgradable from: 2.7.12-1ubuntu0~16.04.13]
libpython2.7-dev/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 amd64 [upgradable from: 2.7.12-1ubuntu0~16.04.13]
libpython2.7-minimal/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 amd64 [upgradable from: 2.7.12-1ubuntu0~16.04.13]
libpython2.7-stdlib/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 amd64 [upgradable from: 2.7.12-1ubuntu0~16.04.13]
python2.7/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 amd64 [upgradable from: 2.7.12-1ubuntu0~16.04.13]
python2.7-dev/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 amd64 [upgradable from: 2.7.12-1ubuntu0~16.04.13]
python2.7-minimal/xenial-updates,xenial-security 2.7.12-1ubuntu0~16.04.14 amd64 [upgradable from: 2.7.12-1ubuntu0~16.04.13]

sudo apt 升级

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib python2.7 python2.7-dev python2.7-minimal
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.9 MB of archives.
After this operation, 18.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Ign:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
Ign:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7 amd64 2.7.12-1ubuntu0~16.04.14
Ign:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.14
Ign:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.14
Ign:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
Ign:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7 amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7-dev_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7-dev_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7-minimal_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7-minimal_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

sudo apt 升级--修复缺失

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib python2.7 python2.7-dev python2.7-minimal
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.9 MB of archives.
After this operation, 18.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Ign:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
Ign:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7 amd64 2.7.12-1ubuntu0~16.04.14
Ign:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.14
Ign:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.14
Ign:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
Ign:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7 amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
Err:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.14
  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7-dev_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7-dev_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7-minimal_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7-minimal_2.7.12-1ubuntu0~16.04.14_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

答案1

软件包维护者可能已经提升了 Python 软件包版本,以解决https://ubuntu.com/security/notices/USN-4754-1.如果你看看http://security.ubuntu.com/ubuntu/pool/main/p/python2.7/,你会看到它仍然具有以前的版本 2.7.12-1ubuntu0~16.04.13,而 apt 正在寻找 2.7.12-1ubuntu0~16.04.14。我猜上游 Packages.gz(软件包列表)包含该软件包的升级版本,但镜像实际上没有它所指的新软件包版本。

编辑:看起来更新的软件包现在存在于存储库中。使用安装了 Python 2.7 的 Xenial 的 Docker 构建进行了确认。

相关内容