禁用第三方源后,将服务器从 16.04.7 升级到 18.04 失败

禁用第三方源后,将服务器从 16.04.7 升级到 18.04 失败

我检查过类似的问题,并尝试过,但无济于事。我已将来源从存档更改为不同的国家。

Updating repository information

To continue please press [ENTER]

Fetched 0 B in 0s (0 B/s)

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done

Invalid package information

After updating your package information, the essential package
'ubuntu-minimal' could not be located. This may be because you have
no official mirrors listed in your software sources, or because of
excessive load on the mirror you are using. See /etc/apt/sources.list
for the current list of configured software sources.
In the case of an overloaded mirror, you may want to try the upgrade
again later.


Restoring original system state

Aborting
      g package lists... 3%
*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
Reading package lists... Done
sources.list is just 
deb http://de.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
#deb-src http://de.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse

deb http://de.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
#deb-src http://de.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse

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

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-src http://archive.canonical.com/ubuntu xenial partner

/etc/apt/sources.list.d 目录中没有任何内容。我不明白为什么运行

sudo -E do-release-upgrade

失败了。我不确定失败信息保存在哪里,因为 /var/log/apt 没有更新或任何其他明显的日志。任何帮助或指导。

编辑找到了日志。/var/log/dist-upgrade 时钟关闭了大约 20 分钟,因此不太明显。

2021-02-07 22:23:02,900 DEBUG Foreign:
2021-02-07 22:23:02,900 DEBUG Obsolete:
2021-02-07 22:23:02,901 DEBUG updateSourcesList()
2021-02-07 22:23:02,928 DEBUG rewriteSourcesList() with mirror_check
2021-02-07 22:23:02,928 DEBUG ['ubuntu-minimal', 'ubuntu-standard']
2021-02-07 22:23:02,928 DEBUG Checking pkg: ubuntu-minimal
2021-02-07 22:23:02,931 DEBUG Checking pkg: ubuntu-standard
2021-02-07 22:23:02,933 DEBUG examining: 'deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse'
2021-02-07 22:23:02,933 DEBUG verifySourcesListEntry: deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
2021-02-07 22:23:02,933 DEBUG url_downloadable: http://archive.ubuntu.com/ubuntu/dists/bionic/Release
2021-02-07 22:23:02,933 DEBUG s='http' n='archive.ubuntu.com' p='/ubuntu/dists/bionic/Release' q='' f=''
2021-02-07 22:23:02,937 DEBUG error from httplib: '<urlopen error Tunnel connection failed: 403 Forbidden>'
2021-02-07 22:23:02,937 DEBUG entry '# deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,937 DEBUG examining: 'deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse'
2021-02-07 22:23:02,937 DEBUG entry '# deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,938 DEBUG examining: 'deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse'
2021-02-07 22:23:02,938 DEBUG entry '# deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,938 DEBUG examining: 'deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse'
2021-02-07 22:23:02,938 DEBUG entry '# deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,938 DEBUG examining: 'deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse'
2021-02-07 22:23:02,938 DEBUG entry '# deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,938 DEBUG examining: 'deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse'
2021-02-07 22:23:02,938 DEBUG entry '# deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,938 DEBUG examining: 'deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse'
2021-02-07 22:23:02,938 DEBUG entry '# deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,938 DEBUG examining: 'deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse'
2021-02-07 22:23:02,939 DEBUG entry '# deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse' was disabled (no Release file)
2021-02-07 22:23:02,939 DEBUG examining: 'deb http://archive.canonical.com/ubuntu xenial partner'
2021-02-07 22:23:02,939 DEBUG verifySourcesListEntry: deb http://archive.canonical.com/ubuntu bionic partner
2021-02-07 22:23:02,939 DEBUG url_downloadable: http://archive.canonical.com/ubuntu/dists/bionic/Release
2021-02-07 22:23:02,939 DEBUG s='http' n='archive.canonical.com' p='/ubuntu/dists/bionic/Release' q='' f=''
2021-02-07 22:23:02,940 DEBUG error from httplib: '<urlopen error Tunnel connection failed: 403 Forbidden>'
2021-02-07 22:23:02,940 DEBUG entry '# deb http://archive.canonical.com/ubuntu xenial partner' was disabled (no Release file)
2021-02-07 22:23:02,940 DEBUG examining: 'deb-src http://archive.canonical.com/ubuntu xenial partner'
2021-02-07 22:23:02,940 DEBUG entry '# deb-src http://archive.canonical.com/ubuntu xenial partner' was disabled (no Release file)
2021-02-07 22:23:04,594 DEBUG running doUpdate() (showErrors=True)
2021-02-07 22:23:04,597 DEBUG openCache()
2021-02-07 22:23:04,698 DEBUG /openCache(), new cache size 796
2021-02-07 22:23:04,699 DEBUG need_server_mode(): can not find a desktop meta package or key deps, running in server mode
2021-02-07 22:23:04,699 ERROR No 'ubuntu-minimal' available/downloadable after sources.list rewrite+update
2021-02-07 22:23:04,699 ERROR 'ubuntu-minimal' was not downloadable
2021-02-07 22:23:04,702 DEBUG abort called
2021-02-07 22:23:04,702 DEBUG openCache()
2021-02-07 22:23:06,995 DEBUG /openCache(), new cache size 92695

已注释掉 archive.canonical.com 来源,但仍看到error from httplib: 'urlopen erro Tunnel connection failed: 403 Forbidden>'只有升级后才会发生这种情况。我能够毫无问题地下载和安装 ntp。

答案1

搞清楚了。我为 http 和 https 都设置了代理。显然 http 不喜欢被迫使用 https……

Acquire::http::Proxy "https://web-1a:3163";
Acquire::https::Proxy "https://web-1a:3163";

一旦我修复了 http 代理,一切就都可以恢复了。

相关内容