当我尝试更新软件时出现以下错误:
Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
The following packages have unmet dependencies:
initramfs-tools-core: Depends: busybox-initramfs (>= 1:1.30.1-4ubuntu5~) but 1:1.36.1-3ubuntu1 is installed
Depends: dhcpcd-base but it is not installed
Depends: initramfs-tools-bin (= 0.142ubuntu15.1) but 0.142ubuntu15.1 is installed
Depends: klibc-utils (>= 2.0.4-8~) but 2.0.13-1 is installed
Depends: cpio (>= 2.12) but 2.13+dfsg-7.1 is installed
Depends: coreutils (>= 8.24) but 9.1-1ubuntu2 is installed
ubuntu-minimal: Depends: dhcpcd-base but it is not installed
在终端中输入 sudo apt --fix-broken install 时我得到以下信息:
sudo apt --fix-broken install Reading package lists... Done Building dependency tree... Done Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: fdisk fonts-kacst fonts-kacst-one fonts-khmeros-core fonts-lao fonts-liberation2 fonts-lklug-sinhala fonts-sil-abyssinica fonts-sil-padauk fonts-thai-tlwg fonts-tibetan-machine fonts-tlwg-garuda fonts-tlwg-garuda-ttf fonts-tlwg-kinnari fonts-tlwg-kinnari-ttf fonts-tlwg-laksaman fonts-tlwg-laksaman-ttf fonts-tlwg-loma fonts-tlwg-loma-ttf fonts-tlwg-mono fonts-tlwg-mono-ttf fonts-tlwg-norasi fonts-tlwg-norasi-ttf fonts-tlwg-purisa fonts-tlwg-purisa-ttf fonts-tlwg-sawasdee fonts-tlwg-sawasdee-ttf fonts-tlwg-typewriter fonts-tlwg-typewriter-ttf fonts-tlwg-typist fonts-tlwg-typist-ttf fonts-tlwg-typo fonts-tlwg-typo-ttf fonts-tlwg-umpush fonts-tlwg-umpush-ttf fonts-tlwg-waree fonts-tlwg-waree-ttf g++-12 gdisk gir1.2-javascriptcoregtk-4.0 gir1.2-soup-2.4 gir1.2-webkit2-4.0 libavutil57 libblas3 libblockdev-crypto2 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2 libcodec2-1.0 libcolamd2 libdmapsharing-3.0-2 liblapack3 liblc3-0 liblua5.3-0 libmfx1 libmozjs-102-0 liborcus-0.17-0 liborcus-parser-0.17-0 libpoppler126 libraw20 libsoup-gnome2.4-1 libstdc++-12-dev libsuitesparseconfig5 linux-headers-6.2.0-37 linux-headers-6.2.0-37-generic linux-image-6.2.0-37-generic linux-modules-6.2.0-37-generic linux-modules-extra-6.2.0-37-generic python3-numpy python3-renderpm python3-reportlab-accel Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: dhcpcd-base The following NEW packages will be installed: dhcpcd-base 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 4 not fully installed or removed. Need to get 0 B/213 kB of archives. After this operation, 521 kB of additional disk space will be used. Do you want to continue? [Y/n] y dpkg: regarding .../dhcpcd-base_1%3a10.0.2-3ubuntu3_amd64.deb containing dhcpcd- base: dhcpcd-base conflicts with dhcp-client isc-dhcp-client provides dhcp-client and is present and installed.
dpkg: error processing archive /var/cache/apt/archives/dhcpcd-base_1%3a10.0.2-3u buntu3_amd64.deb (--unpack): conflicting packages - not installing dhcpcd-base Errors were encountered while processing: /var/cache/apt/archives/dhcpcd-base_1%3a10.0.2-3ubuntu3_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
您的升级被中断 ( 4 not fully installed
),其中部分内容与此dhcpcd-base conflicts with dhcp-client isc-dhcp-client provides dhcp-client and is present and installed.
相关。我使用的是 23.10,并且我有,dhcpcd-base
但我没有isc-dhcp-client
。请执行以下操作来修复您的软件包:
sudo -i
dpkg --configure -a
dpkg --force-all -r isc-dhcp-client
dpkg --force-all -i /var/cache/apt/archives/dhcpcd-base_1%3a10.0.2-3ubuntu3_amd64.deb
dpkg --configure -a
apt update
apt --fix-broken install
apt upgrade
apt dist-upgrade