我刚刚升级了我的 Ubuntu 服务器20.04 LTS到22.04.2 LTS(apt update、apt upgrade、apt dist-upgrade、do-release-upgrade、apt full-upgrade)升级后,systemd corruption
系统无法在常规条件下运行。
我的意思是,不知道为什么,但系统中存在旧的 systemd 文件,并且一些库或二进制文件仍然链接到它们。
顺便提一句,Ubuntu 22.04.2应该使用systemd 249但我看到了以下内容:
ldd /usr/bin/journalctl
linux-vdso.so.1 (0x00007fff45734000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd1d9761000)
libsystemd-shared-245.so => not found
libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fd1d96ca000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd1d99b3000)
systemd-245 库:
ldd /usr/bin/systemd-machine-id-setup
linux-vdso.so.1 (0x00007ffedc140000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd2110ea000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd21132f000)
libsystemd-shared-245.so => not found
ldd /lib/systemd/libsystemd-shared-249.so
linux-vdso.so.1 (0x00007ffe7bd88000)
libacl.so.1 => /usr/lib/x86_64-linux-gnu/libacl.so.1 (0x00007f83140d5000)
libblkid.so.1 => /usr/lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f831409e000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f8314093000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f8314059000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f8313f13000)
libip4tc.so.2 => /usr/lib/x86_64-linux-gnu/libip4tc.so.2 (0x00007f8313f09000)
libkmod.so.2 => /usr/lib/x86_64-linux-gnu/libkmod.so.2 (0x00007f8313eeb000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f8313ecb000)
libmount.so.1 => /usr/lib/x86_64-linux-gnu/libmount.so.1 (0x00007f8313e87000)
libcrypto.so.3 => /usr/lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f8313a44000)
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007f8313a32000)
libseccomp.so.2 => /usr/lib/x86_64-linux-gnu/libseccomp.so.2 (0x00007f8313a12000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f83139e4000)
libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f8313915000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f83138ea000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f83136c2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f83143ac000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f831369c000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007f831366c000)
libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f83135d5000)
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007f83135cd000)
某些包安装过程中出现错误:
Setting up opendkim (2.11.0~beta2-6) ...
systemd-tmpfiles: error while loading shared libraries: libsystemd-shared-245.so: cannot open shared object file: No such file or directory
Setting up opendmarc (1.4.2-1) ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/opendmarc.conf
dbconfig-common: flushing administrative password
systemd-tmpfiles: error while loading shared libraries: libsystemd-shared-245.so: cannot open shared object file: No such file or directory
重新启动某些服务时显示错误:
Restarting php5.6-fpm (via systemctl): php5.6-fpm.serviceJob for php5.6-fpm.service failed because the control process exited with error code.
See "systemctl status php5.6-fpm.service" and "journalctl -xeu php5.6-fpm.service" for details.
failed!
root@we:~# journalctl -xeu php5.6-fpm.service
journalctl: error while loading shared libraries: libsystemd-shared-245.so: cannot open shared object file: No such file or directory
重启快递:
Restarting courier-authdaemon (via systemctl): courier-authdaemon.serviceJob for courier-authdaemon.service failed because the control process exited with error code.
See "systemctl status courier-authdaemon.service" and "journalctl -xe" for details.
failed!
Restarting courier-imap (via systemctl): courier-imap.serviceA dependency job for courier-imap.service failed. See 'journalctl -xe' for details.
failed!
Restarting courier-imap-ssl (via systemctl): courier-imap-ssl.serviceA dependency job for courier-imap-ssl.service failed. See 'journalctl -xe' for details.
jorunalctl -xe
:
journalctl -xe
journalctl: error while loading shared libraries: libsystemd-shared-245.so: cannot open shared object file: No such file or directory
LD_LIBRARY_PATH=/usr/lib/systemd/:/usr/lib:/lib apt-get --reinstall install courier-authdaemon courier-authlib courier-authlib-mysql courier-authlib-userdb courier-base courier-imap courier-pop libcourier-unicode
Preparing to unpack .../0-courier-base_1.0.16-3build3_amd64.deb ...
Unpacking courier-base (1.0.16-3build3) over (1.0.16-3build3) ...
Preparing to unpack .../1-courier-authdaemon_0.71.1-2build1_amd64.deb ...
Unpacking courier-authdaemon (0.71.1-2build1) over (0.71.1-2build1) ...
Preparing to unpack .../2-courier-authlib_0.71.1-2build1_amd64.deb ...
Unpacking courier-authlib (0.71.1-2build1) over (0.71.1-2build1) ...
Preparing to unpack .../3-courier-authlib-mysql_0.71.1-2build1_amd64.deb ...
Unpacking courier-authlib-mysql (0.71.1-2build1) over (0.71.1-2build1) ...
Preparing to unpack .../4-courier-authlib-userdb_0.71.1-2build1_amd64.deb ...
Unpacking courier-authlib-userdb (0.71.1-2build1) over (0.71.1-2build1) ...
Preparing to unpack .../5-libcourier-unicode4_2.1.2-2_amd64.deb ...
Unpacking libcourier-unicode4:amd64 (2.1.2-2) over (2.1.2-2) ...
Preparing to unpack .../6-courier-imap_5.0.13+1.0.16-3build3_amd64.deb ...
Unpacking courier-imap (5.0.13+1.0.16-3build3) over (5.0.13+1.0.16-3build3) ...
Preparing to unpack .../7-courier-pop_1.0.16-3build3_amd64.deb ...
Unpacking courier-pop (1.0.16-3build3) over (1.0.16-3build3) ...
Setting up courier-authlib (0.71.1-2build1) ...
Setting up courier-authlib-mysql (0.71.1-2build1) ...
Setting up libcourier-unicode4:amd64 (2.1.2-2) ...
Setting up courier-authdaemon (0.71.1-2build1) ...
systemd-tmpfiles: error while loading shared libraries: libsystemd-shared-245.so: cannot open shared object file: No such file or directory
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142.
Setting up courier-authlib-userdb (0.71.1-2build1) ...
Setting up courier-base (1.0.16-3build3) ...
Setting up courier-pop (1.0.16-3build3) ...
systemd-tmpfiles: error while loading shared libraries: libsystemd-shared-245.so: cannot open shared object file: No such file or directory
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142.
Setting up courier-imap (5.0.13+1.0.16-3build3) ...
systemd-tmpfiles: error while loading shared libraries: libsystemd-shared-245.so: cannot open shared object file: No such file or directory
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
>
● systemd-sysusers.service loaded failed failed Create System Users >
● systemd-timesyncd.service loaded failed failed Network Time Synchronization >
● systemd-tmpfiles-clean.service loaded failed failed Cleanup of Temporary Directories >
● systemd-tmpfiles-setup-dev.service loaded failed failed Create Static Device Nodes in /dev >
● systemd-tmpfiles-setup.service loaded failed failed Create Volatile Files and Directories
有人知道我该如何找到所有 systemd 不一致之处并重新安装它们吗?我担心有很多库链接到错误的 systemd 版本。