无法升级 Ubuntu Studio 24.04,因为未满足的依赖项

无法升级 Ubuntu Studio 24.04,因为未满足的依赖项

升级至

Distributor ID: Ubuntu
Description:Ubuntu Noble Numbat (development branch)
Release: 24.04
Codename:noble 

apt 不会更新未满足的依赖项的 bcs。

The following packages have unmet dependencies:
 libfontconfig1 : Depends: fontconfig-config (>= 2.14.2-6ubuntu1)
 libfontconfig1:i386 : Depends: fontconfig-config:i386 (>= 2.14.2-6ubuntu1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 

我试过了:

apt --fix-broken install

dpkg: error processing archive /var/cache/apt/archives/fontconfig-config_2.14.2-6ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/etc/fonts/conf.d/10-sub-pixel-rgb.conf', which is also in package ubuntustudio-default-settings 22.04.26.3
dpkg-query: package 'fontconfig-config' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
dpkg-query: package 'fontconfig-config' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
dpkg-query: package 'fontconfig-config' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Errors were encountered while processing:
 /var/cache/apt/archives/fontconfig-config_2.14.2-6ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

问题是 24.04 移出/etc/fonts/conf.d/10-sub-pixel-rgb.confubuntustudio-default-settings)并进入fontconfig-config。该ubuntustudio-default-settings软件包需要先更新,但是维护人员忘记添加自动Conflicts:行。

您可以通过运行 重新尝试以正确的顺序安装软件包sudo apt install --upgrade ubuntustudio-default-settings。如果这不起作用,则需要强制以正确的顺序重新安装:

sudo -i

apt update
apt download ubuntustudio-default-settings
apt download fontconfig-config

# Temporarily force-uninstall only ubuntustudio-default-settings
# so that we DON'T uninstall ubuntustudio-desktop
dpkg --force-all -r ubuntustudio-default-settings
dpkg --force-all -i ./fontconfig-config_*
dpkg --force-all -i ./ubuntustudio-default-settings_*

dpkg --configure -a
apt --fix-broken install
apt upgrade
apt dist-upgrade

相关内容