Ubuntu--The package system is broken

本文记录了一次在Ubuntu系统中遇到的包系统损坏问题及解决过程。作者在卸载phpmyadmin过程中遇到了“The packagesystem is broken”错误,并通过执行“apt-get install -f”命令成功修复了该问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Ubuntu--The package system is broken


昨天晚上在配置phpmyadmin时出现意外,想卸载了再重新安装,卸载的时候发生错误,一直提示The package system is broken,安装别的软件仍旧提示这个错误,消息框提示“apt-get install -f”,但是我没有在意,找了很多资料都不知道为什么,于是就按提示执行了下“apt-get install -f”,问题解决了。至于里面是什么道理,暂时还是不知道。

root@yolubt:~/kvm-offline# dpkg -i *.deb Selecting previously unselected package bridge-utils. (Reading database ... 74266 files and directories currently installed.) Preparing to unpack bridge-utils_1.7-1ubuntu3_amd64.deb ... Unpacking bridge-utils (1.7-1ubuntu3) ... Selecting previously unselected package cpu-checker. Preparing to unpack cpu-checker_0.7-1.3build1_amd64.deb ... Unpacking cpu-checker (0.7-1.3build1) ... Selecting previously unselected package libvirt-clients. Preparing to unpack libvirt-clients_8.0.0-1ubuntu7.11_amd64.deb ... Unpacking libvirt-clients (8.0.0-1ubuntu7.11) ... Selecting previously unselected package libvirt-daemon-system. Preparing to unpack libvirt-daemon-system_8.0.0-1ubuntu7.11_amd64.deb ... Unpacking libvirt-daemon-system (8.0.0-1ubuntu7.11) ... Selecting previously unselected package qemu-system-x86. Preparing to unpack qemu-system-x86_1%3a6.2+dfsg-2ubuntu6.26_amd64.deb ... Unpacking qemu-system-x86 (1:6.2+dfsg-2ubuntu6.26) ... Selecting previously unselected package virtinst. Preparing to unpack virtinst_1%3a4.0.0-1_all.deb ... Unpacking virtinst (1:4.0.0-1) ... Setting up bridge-utils (1.7-1ubuntu3) ... dpkg: dependency problems prevent configuration of cpu-checker: cpu-checker depends on msr-tools; however: Package msr-tools is not installed. dpkg: error processing package cpu-checker (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libvirt-clients: libvirt-clients depends on libvirt0 (= 8.0.0-1ubuntu7.11); however: Package libvirt0 is not installed. dpkg: error processing package libvirt-clients (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libvirt-daemon-system: libvirt-daemon-system depends on libvirt-clients (= 8.0.0-1ubuntu7.11); however: Package libvirt-clients is not configured yet. libvirt-daemon-system depends on libvirt-daemon (= 8.0.0-1ubuntu7.11); however: Package libvirt-daemon is not installed. libvirt-daemon-system depends on libvirt-daemon-config-network (= 8.0.0-1ubuntu7.11); however: Package libvirt-daemon-config-network is not installed. libvirt-daemon-system depends on libvirt-daemon-config-nwfilter (= 8.0.0-1ubuntu7.11); however: Package libvirt-daemon-config-nwfilter is not installed. libvirt-daemon-system depends on libvirt-daemon-system-systemd (= 8.0.0-1ubuntu7.11) | libvirt-daemon-system-sysv (= 8.0.0-1ubuntu7.11); however: Package libvirt-daemon-system-systemd is not installed. Package libvirt-daemon-system-sysv is not installed. dpkg: error processing package libvirt-daemon-system (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of qemu-system-x86: qemu-system-x86 depends on libfdt1 (>= 1.6.1); however: Package libfdt1 is not installed. qemu-system-x86 depends on libibverbs1 (>= 28); however: Package libibverbs1 is not installed. qemu-system-x86 depends on libjpeg8 (>= 8c); however: Package libjpeg8 is not installed. qemu-system-x86 depends on libpixman-1-0 (>= 0.19.6); however: Package libpixman-1-0 is not installed. qemu-system-x86 depends on libpmem1 (>= 1.4); however: Package libpmem1 is not installed. qemu-system-x86 depends on librdmacm1 (>= 1.0.15); however: Package librdmacm1 is not installed. qemu-system-x86 depends on libslirp0 (>= 4.0.0); however: Package libslirp0 is not installed. qemu-system-x86 depends on liburing2 (>= 2.0); however: Package liburing2 is not installed. qemu-system-x86 depends on qemu-system-common (= 1:6.2+dfsg-2ubuntu6.26); however: Package qemu-system-common is not installed. qemu-system-x86 depends on qemu-system-data (>> 1:6.2+dfsg-2ubuntu6.26~); however: Package qemu-system-data is not installed. qemu-system-x86 depends on seabios; however: Package seabios is not installed. qemu-system-x86 depends on ipxe-qemu; however: Package ipxe-qemu is not installed. qemu-system-x86 depends on ipxe-qemu-256k-compat-efi-roms; however: Package ipxe-qemu-256k-compat-efi-roms is not installed. dpkg: error processing package qemu-system-x86 (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of virtinst: virtinst depends on xorriso; however: Package xorriso is not installed. virtinst depends on gir1.2-libosinfo-1.0; however: Package gir1.2-libosinfo-1.0 is not installed. virtinst depends on python3-libvirt (>= 0.4.6); however: Package python3-libvirt is not installed. virtinst depends on python3-libxml2; however: Package python3-libxml2 is not installed. dpkg: error processing package virtinst (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.10.2-1) ... Errors were encountered while processing: cpu-checker libvirt-clients libvirt-daemon-system qemu-system-x86 virtinst root@yolubt:~/kvm-offline#
07-15
root@yolubt:~/kvm-offline# sudo apt install apt-rdepends Reading package lists... Donelibvirt-daemon-system | grep -v "^Reverse" > full-deps.list 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: apt-rdepends : Depends: libapt-pkg-perl but it is not going to be installed cpu-checker : Depends: msr-tools but it is not going to be installed libvirt-clients : Depends: libvirt0 (= 8.0.0-1ubuntu7.11) but it is not going to be installed libvirt-daemon-system : Depends: libvirt-daemon (= 8.0.0-1ubuntu7.11) but it is not going to be installed Depends: libvirt-daemon-config-network (= 8.0.0-1ubuntu7.11) but it is not going to be installed Depends: libvirt-daemon-config-nwfilter (= 8.0.0-1ubuntu7.11) but it is not going to be installed Depends: libvirt-daemon-system-systemd (= 8.0.0-1ubuntu7.11) but it is not going to be installed or libvirt-daemon-system-sysv (= 8.0.0-1ubuntu7.11) but it is not going to be installed Recommends: dnsmasq-base Recommends: mdevctl but it is not going to be installed Recommends: swtpm-tools but it is not going to be installed qemu-system-x86 : Depends: libfdt1 (>= 1.6.1) but it is not going to be installed Depends: libibverbs1 (>= 28) but it is not going to be installed Depends: libjpeg8 (>= 8c) but it is not going to be installed Depends: libpixman-1-0 (>= 0.19.6) but it is not going to be installed Depends: libpmem1 (>= 1.4) but it is not going to be installed Depends: librdmacm1 (>= 1.0.15) but it is not going to be installed Depends: libslirp0 (>= 4.0.0) but it is not going to be installed Depends: liburing2 (>= 2.0) but it is not going to be installed Depends: qemu-system-common (= 1:6.2+dfsg-2ubuntu6.26) but it is not going to be installed Depends: qemu-system-data (> 1:6.2+dfsg-2ubuntu6.26~) but it is not going to be installed Depends: seabios but it is not going to be installed Depends: ipxe-qemu but it is not going to be installed Depends: ipxe-qemu-256k-compat-efi-roms but it is not going to be installed Recommends: qemu-system-gui (= 1:6.2+dfsg-2ubuntu6.26) but it is not going to be installed Recommends: qemu-utils but it is not going to be installed Recommends: ovmf but it is not going to be installed Recommends: qemu-block-extra (= 1:6.2+dfsg-2ubuntu6.26) but it is not going to be installed virtinst : Depends: xorriso but it is not going to be installed Depends: gir1.2-libosinfo-1.0 but it is not going to be installed Depends: python3-libvirt (>= 0.4.6) but it is not going to be installed Depends: python3-libxml2 but it is not going to be installed Recommends: qemu-utils but it is not going to be installed Recommends: virt-viewer but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
最新发布
07-15
(Zmamba) zhangzeyuan@DESKTOP-8B20VC8:~$ sudo apt install ubuntu-drivers-common Reading package lists... Done Building dependency tree... Done Reading state information... Done Suggested packages: python3-aptdaemon.pkcompat The following NEW packages will be installed: ubuntu-drivers-common 0 upgraded, 1 newly installed, 0 to remove and 100 not upgraded. 8 not fully installed or removed. Need to get 59.4 kB of archives. After this operation, 300 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 ubuntu-drivers-common amd64 1:0.9.6.2~0.22.04.8 [59.4 kB] Fetched 59.4 kB in 1s (50.2 kB/s) Preconfiguring packages ... Selecting previously unselected package ubuntu-drivers-common. (Reading database ... 85780 files and directories currently installed.) Preparing to unpack .../ubuntu-drivers-common_1%3a0.9.6.2~0.22.04.8_amd64.deb ... Unpacking ubuntu-drivers-common (1:0.9.6.2~0.22.04.8) ... Setting up ubuntu-drivers-common (1:0.9.6.2~0.22.04.8) ... Created symlink /etc/systemd/system/display-manager.service.wants/gpu-manager.service → /lib/systemd/system/gpu-manager.service. Unit /lib/systemd/system/gpu-manager.service is added as a dependency to a non-existent unit display-manager.service. Created symlink /etc/systemd/system/oem-config.service.wants/gpu-manager.service → /lib/systemd/system/gpu-manager.service. Unit /lib/systemd/system/gpu-manager.service is added as a dependency to a non-existent unit oem-config.service. Setting up nvidia-dkms-535 (535.54.03-0ubuntu1) ... A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting the following file: /etc/modprobe.d/nvidia-graphics-drivers.conf A new initrd image has also been created. To revert, please regenerate your initrd by running the following command after deleting the modprobe.d file: `/usr/sbin/initramfs -u` ***************************************************************************** *** Reboot your computer and verify that the NVIDIA graphics driver can *** *** be loaded. *** ***************************************************************************** INFO:Enable nvidia DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here Removing old nvidia-535.54.03 DKMS files... Deleting module nvidia-535.54.03 completely from the DKMS tree. Loading new nvidia-535.54.03 DKMS files... It is likely that 5.10.16.3-microsoft-standard-WSL2 belongs to a chroot's host Building for 5.15.0-141-generic Building for architecture x86_64 Building initial module for 5.15.0-141-generic ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-535.0.crash' Error! Bad return status for module build on kernel: 5.15.0-141-generic (x86_64) Consult /var/lib/dkms/nvidia/535.54.03/build/make.log for more information. dpkg: error processing package nvidia-dkms-535 (--configure): installed nvidia-dkms-535 package post-installation script subprocess returned error exit status 10 dpkg: dependency problems prevent configuration of cuda-drivers-535: cuda-drivers-535 depends on nvidia-dkms-535 (>= 535.54.03); however: Package nvidia-dkms-535 is not configured yet. dpkg: error processing package cuda-drivers-535 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of cuda-drivers: cuda-drivers depends on cuda-drivers-535 (= 535.54.03-1); however: Package cuda-drivers-535 is not configured yet. dpkg: error processing package cuda-drivers (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of nvidia-driver-535: nvidia-driver-535 depends on nvidia-dkms-535 (= 535.54.03-0ubuntu1); however: Package nvidia-dkms-535 is not configured yet. dpkg: error processing package nvidia-driver-535 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of cuda-runtNo apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already ime-12-2: cuda-runtime-12-2 depends on cuda-drivers (>= 535.54.03); however: Package cuda-drivers is not configured yet. dpkg: error processing package cuda-runtime-12-2 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of cuda-12-2: cuda-12-2 depends on cuda-runtime-12-2 (>= 12.2.0); however: Package cuda-runtime-12-2 is not configured yet. dpkg: error processing package cuda-12-2 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of cuda: cuda depends on cuda-12-2 (>= 12.2.0); however: Package cuda-12-2 is not configured yet. dpkg: error processing package cuda (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of cuda-demo-suite-12-2: cuda-demo-suite-12-2 depends on cuda-runtime-12-2; however: Package cuda-runtime-12-2 is not configured yet. dpkg: error processing package cuda-demo-suite-12-2 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: nvidia-dkms-535 cuda-drivers-535 cuda-drivers nvidia-driver-535 cuda-runtime-12-2 cuda-12-2 cuda cuda-demo-suite-12-2 E: Sub-process /usr/bin/dpkg returned an error code (1) (Zmamba) zhangzeyuan@DESKTOP-8B20VC8:~$ 怎么解决
06-13
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值