Fri*_*s50 7 package-management apt dpkg
升级到 Ubuntu 22.04 时发生了这个致命错误。
FATAL ERROR:
Both /bin/systemd-tmpfiles and /usr/bin/systemd-tmpfiles exist.
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
dpkg: error when processing package usrmerge (--configure):
subprocess of package usrmerge was installed script post-installation
returned error value 1 Errors found while processing: usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
usrmerge 实现上的一系列错误已被公开:
https://bugs.launchpad.net/ubuntu/+source/usrmerge/+bugs?field.status:list=NEW
usmerge 存在的原因首先可以追溯到 20 世纪 70 年代的 unix 历史。参见例如https://lwn.net/Articles/477467/
usrmerge 包的 README 试图解释一下(请做好准备,这一切都非常神秘......) https://salsa.debian.org/md/usrmerge/raw/master/debian/README.Debian
坏消息是如果你打电话
sudo /usr/lib/usrmerge/convert-usrmerge
Run Code Online (Sandbox Code Playgroud)
您必须手动解决以逐步方式显示的问题。
例如,我在 /bin/evince 和 /usr/bin/evince 中得到了重复的 evince - 比较了两者并删除了 /bin/evince
然后
FATAL ERROR:
Both /lib64/ld-linux-x86-64.so.2 and /usr/lib64/ld-linux-x86-64.so.2 exist.
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
Run Code Online (Sandbox Code Playgroud)
注意不要删除 /lib64/ld-linux-x86-64.so.2 - 它会让你的系统无法使用,你必须使用 USB 启动棒等来修复问题
我必须恢复这个符号链接:
root@my_computer:/lib64# ls -l
total 0
lrwxrwxrwx 1 root root 42 Jul 7 01:23 ld-linux-x86-64.so.2 -> /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
Run Code Online (Sandbox Code Playgroud)
我最终扔掉了这个包,等到尘埃落定,开发人员齐心协力,更好地描述如何用普通人可能理解的语言来修复问题:
sudo apt remove --purge usrmerge
Run Code Online (Sandbox Code Playgroud)
问题不在于 usrmerge 本身,而是 usrmerge 试图解决的问题。当一个软件包在 /lib 中安装一个库,而另一个软件包在 /usr/lib 中安装相同的库时,这将是一个问题。usrmerge 通过符号链接所有内容来解决这个问题,这样就不会再对库的安装位置产生任何困惑。
最重要的是,就我而言,有一个具有“不可变”属性的库,这意味着 usrmerge(或 dpkg,就此而言!)无法删除或替换该文件。这导致了另一个随之而来的问题(下面的 2)。
这里的问题分为三类:
lsattr
并删除a
和i
标志chattr -i -a /the/file
find / -name "*~usrmerge* -delete
dpkg
。其中之一肯定不是,所以您应该删除它:dpkg -S {/usr,}/lib/a
a:amd64: /usr/lib/a
dpkg-query: no path found matching pattern /lib/a
Run Code Online (Sandbox Code Playgroud)
在这种情况下,/lib/a
可以删除并再次运行 Convert-usrmerge。只需一点点努力,您就可以将其转换为一个脚本,该脚本将解析输出 Convert-usrrmerge 和上面的 dpkg 命令,并迭代地解决所有问题,我也这样做了。
免责声明:不幸的是,由于其他问题,我需要回滚系统,并且不再有确切的命令或脚本,所以我从头顶输入了以上内容。请谨慎对待此类事情。
归档时间: |
|
查看次数: |
7833 次 |
最近记录: |