再次错误下载pop-desktop后,udev和systemd出现依赖错误,导致我无法使用apt。当我运行 sudo apt update 时,出现此错误:
user@computer:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpam-systemd : Depends: systemd (= 249.11-0ubuntu3.1)
systemd-sysv : Depends: systemd (= 249.11-0ubuntu3.1)
udev : Breaks: systemd (< 249.11-0ubuntu3.1)
Breaks: systemd:i386 (< 249.11-0ubuntu3.1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
当我尝试 sudo apt --fix-broken install 时:
user@computer:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libpam-systemd libudev1 libudev1:i386 systemd-sysv udev
The following packages will be DOWNGRADED:
libpam-systemd libudev1 libudev1:i386 systemd-sysv udev
0 upgraded, 0 newly installed, 5 downgraded, 0 to remove and 63 not upgraded.
3 not fully installed or removed.
Need to get 0 B/2,708 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: dependency problems prevent configuration of systemd:
udev (249.11-0ubuntu3.1) breaks systemd (<< 249.11-0ubuntu3.1) and is installed.
Version of systemd to be configured is 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af.
dpkg: error processing package systemd (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a
previous failure.
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
执行该命令后,我访问了多个来源,但找不到解决方案来解决我的情况。
我尝试了 sudo dpkg --configure -a 并返回了以下内容:
user@computer:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of systemd:
udev (249.11-0ubuntu3.1) breaks systemd (<< 249.11-0ubuntu3.1) and is installed.
Version of systemd to be configured is 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af.
dpkg: error processing package systemd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of systemd-timesyncd:
systemd-timesyncd depends on systemd (= 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af); however:
Package systemd is not configured yet.
dpkg: error processing package systemd-timesyncd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnss-systemd:amd64:
libnss-systemd:amd64 depends on systemd (= 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af); however:
Package systemd is not configured yet.
dpkg: error processing package libnss-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
systemd
systemd-timesyncd
libnss-systemd:amd64
我尝试了 sudo apt -f install 和 sudo apt --fix-broken install :
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libpam-systemd libudev1 libudev1:i386 systemd-sysv udev
The following packages will be DOWNGRADED:
libpam-systemd libudev1 libudev1:i386 systemd-sysv udev
0 upgraded, 0 newly installed, 5 downgraded, 0 to remove and 63 not upgraded.
3 not fully installed or removed.
Need to get 0 B/2,708 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: dependency problems prevent configuration of systemd:
udev (249.11-0ubuntu3.1) breaks systemd (<< 249.11-0ubuntu3.1) and is installed.
Version of systemd to be configured is 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af.
dpkg: error processing package systemd (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a
previous failure.
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
我也尝试过突触:
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: dependency problems prevent configuration of systemd:
udev (249.11-0ubuntu3.1) breaks systemd (<< 249.11-0ubuntu3.1) and is installed.
Version of systemd to be configured is 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af.
dpkg: error processing package systemd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of systemd-timesyncd:
systemd-timesyncd depends on systemd (= 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af); however:
Package systemd is not configured yet.
dpkg: error processing package systemd-timesyncd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnss-systemd:amd64:
libnss-systemd:amd64 depends on systemd (= 249.11-0ubuntu3pop0~1650312774~22.04~cecf6af); however:
Package systemd is not configured yet.
dpkg: error processing package libnss-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
systemd
systemd-timesyncd
libnss-systemd:amd64
有什么办法可以解决这个 udev 和系统问题吗?如果这个问题已经解决了,能否将已解决的链接发给我?只是为了让您知道,我正在使用 Pop!_OS 22.04 LTS。
答案1
我在 Pop_Os 上遇到了同样的问题! 22.04 LTS 和答案在这里https://askubuntu.com/questions/146150/unable-to-fix-broken-packages-with-sudo-apt-get-install-f
为我解决了这个问题。我从该文件中删除了 udev 条目,运行了 apt 升级并成功完成。
然后我确认 udev 已回到文件中,到目前为止一切似乎都正常,并且通过终端或流行商店进行更新现在可以工作,尽管我不能 100% 确定这是否会产生任何负面的后续问题。
在执行任何操作之前,请务必先备份文件,以防万一!