一周前我从 Debian 10 升级到 11。
反复出现的错误是:
symbol lookup error: /lib/systemd/libsystemd-shared-247.so: undefined symbol: seccomp_api_get
它在引导系统时导致内核恐慌。
我不得不切换到 systemv 作为初始化系统。
现在,当我尝试恢复时systemd
,出现以下错误:
root@nas:~# apt install systemd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
systemd is already the newest version (247.3-6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up systemd (247.3-6) ...
systemd-machine-id-setup: symbol lookup error: /lib/systemd/libsystemd-shared-247.so: undefined symbol: seccomp_api_get
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
systemd
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
我的版本:
root@nas:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
root@nas:~# uname -a
Linux nas 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux
我在这里找到了解决方案:
所以我删除了这些文件:
我能够切换回 Systemd。
如何检查
你可以使用
dpkg --search
它,它会告诉你一个文件或目录是否是孤立的:您可以使用以下方法查找没有相应包的文件
cruft-ng
:如何查找不属于任何包的文件?