我刚刚尝试使用 do-release-upgrade 从(32 位)16.04 LTS 升级到 18.04 LTS,但失败了:
The following packages have unmet dependencies:
libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4) but 2.48.2-0ubuntu4.4 is installed
libproxy1-plugin-gsettings : Depends: libproxy1v5 (= 0.4.15-1) but 0.4.11-5ubuntu1 is installed
systemd : Depends: libsystemd0 (= 229-4ubuntu21.27) but 237-3ubuntu10.39 is installed
udev : Depends: libudev1 (= 229-4ubuntu21.27) but 237-3ubuntu10.39 is installed
E: Unmet dependencies. Try using -f.
在尝试升级之前,我认为 ubuntu 16.04 是全新安装的,没有第三方存储库或 PPA。过去,我确实为一个内核安装了这些东西,它知道我试图使用的 Hauppage 电视卡,但它不起作用,所以我撤消了所有操作并返回到标准安装,dpkg --audit 显示没有问题。但我怀疑这就是我的问题根源。十多年来,我从未遇到过 Ubuntu 或 Debian 升级出错的情况,这是我第一次使用第三方存储库。
我到处搜索并尝试了所有通常推荐的方法,例如:
# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4) but 2.48.2-0ubuntu4.4 is installed
libproxy1-plugin-gsettings : Depends: libproxy1v5 (= 0.4.15-1) but 0.4.11-5ubuntu1 is installed
systemd : Depends: libsystemd0 (= 229-4ubuntu21.27) but 237-3ubuntu10.39 is installed
udev : Depends: libudev1 (= 229-4ubuntu21.27) but 237-3ubuntu10.39 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
# dpkg --configure -a
dpkg: dependency problems prevent configuration of libproxy1-plugin-gsettings:i386:
libproxy1-plugin-gsettings:i386 depends on libproxy1v5 (= 0.4.15-1); however:
Version of libproxy1v5:i386 on system is 0.4.11-5ubuntu1.
dpkg: error processing package libproxy1-plugin-gsettings:i386 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libglib2.0-bin:
libglib2.0-bin depends on libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4); however:
Version of libglib2.0-0:i386 on system is 2.48.2-0ubuntu4.4.
dpkg: error processing package libglib2.0-bin (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libproxy1-plugin-gsettings:i386
libglib2.0-bin
不存在保留的包裹或固定偏好。
问题软件包的 apt-cache 策略如下所示:
# apt-cache policy libglib2.0-0
libglib2.0-0:
Installed: 2.48.2-0ubuntu4.4
Candidate: 2.56.4-0ubuntu0.18.04.4
Version table:
2.56.4-0ubuntu0.18.04.4 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
2.56.1-2ubuntu1 500
500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
*** 2.48.2-0ubuntu4.4 100
100 /var/lib/dpkg/status
以上内容在我看来应该很高兴升级。但我真的不明白这一切。
# apt-cache policy libproxy1v5
libproxy1v5:
Installed: 0.4.11-5ubuntu1
Candidate: 0.4.15-1
Version table:
0.4.15-1 500
500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
*** 0.4.11-5ubuntu1 100
100 /var/lib/dpkg/status
和上面一样。
# apt-cache policy libsystemd0
libsystemd0:
Installed: 237-3ubuntu10.39
Candidate: 237-3ubuntu10.39
Version table:
*** 237-3ubuntu10.39 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
100 /var/lib/dpkg/status
237-3ubuntu10.38 500
500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
237-3ubuntu10 500
500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
上面的内容看起来好像安装了比 systemd 所需的版本 (229-4ubuntu21.27) 更新的版本。我不明白为什么会发生这种情况,也不明白为什么 systemd 需要比 18.04 可用的版本更旧的版本。
# apt-cache policy libudev1
libudev1:
Installed: 237-3ubuntu10.39
Candidate: 237-3ubuntu10.39
Version table:
*** 237-3ubuntu10.39 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
100 /var/lib/dpkg/status
237-3ubuntu10.38 500
500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
237-3ubuntu10 500
500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
同上。
dpkg 审计显示:
# dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
libglib2.0-bin Programs for the GLib library
libproxy1-plugin-gsettings:i386 automatic proxy configuration management library (G
The following packages are only half installed, due to problems during
installation. The installation can probably be completed by retrying it;
the packages can be removed using dselect or dpkg --remove:
systemd-shim shim for systemd
systemd-shim 包处于奇怪的状态:
rH systemd-shim 9-1bzr4ubuntu1 i386 shim for systemd
“rH”表示移除并半安装。
尝试 dpkg --configure 它们没有用:
# dpkg --configure libglib2.0-bin
dpkg: dependency problems prevent configuration of libglib2.0-bin:
libglib2.0-bin depends on libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4); however:
Version of libglib2.0-0:i386 on system is 2.48.2-0ubuntu4.4.
dpkg: error processing package libglib2.0-bin (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libglib2.0-bin
# dpkg --configure libproxy1-plugin-gsettings:i386
dpkg: dependency problems prevent configuration of libproxy1-plugin-gsettings:i386:
libproxy1-plugin-gsettings:i386 depends on libproxy1v5 (= 0.4.15-1); however:
Version of libproxy1v5:i386 on system is 0.4.11-5ubuntu1.
dpkg: error processing package libproxy1-plugin-gsettings:i386 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libproxy1-plugin-gsettings:i386
我甚至尝试了 dpkg --remove systemd-shim 的建议,假设它会让我摆脱困境:
# dpkg --remove systemd-shim
(Reading database ... 377504 files and directories currently installed.)
Removing systemd-shim (9-1bzr4ubuntu1) ...
Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim'
dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with
different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed
dpkg: error processing package systemd-shim (--remove):
installed systemd-shim package post-removal script subprocess returned error exit status 2
Errors were encountered while processing:
systemd-shim
我甚至想过卸载有问题的软件包,但由于它们包含 libglibc、systemd 和 udev,这听起来像是一场即将发生的灾难。
有人对如何修复这些包装问题有什么建议吗?
我真的不想重新安装,因为我不想重新配置多年来配置的所有服务。这将是一项艰巨的任务,我永远没有时间去做。我宁愿回到 xenial/16.04。这可能吗?
在此先感谢您提供的任何帮助。