从 Ubuntu 20.04 升级到 22.04 系统失败。在第一步“准备升级”时出现错误消息“Jammy 没有响应”。
怎么了?
我的网络连接良好:
$ ping -c 3 google.com
PING google.com (142.250.74.78) 56(84) bytes of data.
64 bytes from arn09s23-in-f14.1e100.net (142.250.74.78): icmp_seq=1 ttl=55 time=12.5 ms
64 bytes from arn09s23-in-f14.1e100.net (142.250.74.78): icmp_seq=2 ttl=55 time=12.8 ms
64 bytes from arn09s23-in-f14.1e100.net (142.250.74.78): icmp_seq=3 ttl=55 time=12.8 ms
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 12.506/12.687/12.804/0.129 ms
输出do-release-upgrade
显示了几个超时错误:
$ do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1,265 kB]
Fetched 1,266 kB in 0s (0 B/s)
authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg'
extracting 'jammy.tar.gz'
[sudo] password for v:
Reading cache
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://lv.archive.ubuntu.com/ubuntu focal InRelease
Get:1 http://lv.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:2 http://lv.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit https://nginx.org/packages/ubuntu focal InRelease
Hit http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
Get:4 http://lv.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [278 kB]
Hit https://deb.packages.mattermost.com focal InRelease
Get:5 http://lv.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [391 kB]
Get:6 http://lv.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:7 http://lv.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [8,012 B]
Hit https://deb.packages.mattermost.com stable InRelease
Get:8 http://lv.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
Hit https://repo.fortinet.com/repo/6.4/ubuntu /bionic InRelease
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [40.7 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [77.6 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,468 B]
Fetched 1,165 kB in 0s (0 B/s)
Error: Timeout was reached
Error: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.PackageKit': timed out (service_start_timeout=25000ms)
Error: Timeout was reached
Reading package lists... Done
Building dependency tree
Reading state information... Done
None
Restoring original system state
Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
更改 Ubuntu 镜像(通过Software & Updates
工具)没有帮助。但是,也许点击按钮时调用的错误消息Refresh cache提供了一些提示:
答案1
我遇到了同样的问题,因为我有一个/etc/apt/sources.list/
不再存在的包源。在我使用删除无效源后,sudo vi
我能够忽略此消息。