我运行以下命令在 Ubuntu 21.10 上安装 GNOME Vanilla:
sudo apt install vanilla-gnome-desktop
这成功了,我能够登录 GNOME 40.4。但我收到一个随机的 dpkg 错误,如下所示:
Setting up vanilla-gnome-default-settings (20.04.1) ...
update-alternatives: error: no alternatives for gdm3-theme.gresource
dpkg: error processing package vanilla-gnome-default-settings (--configure):
installed vanilla-gnome-default-settings package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of vanilla-gnome-desktop:
vanilla-gnome-desktop depends on vanilla-gnome-default-settings; however:
Package vanilla-gnome-default-settings is not configured yet.
dpkg: error processing package vanilla-gnome-desktop (--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:
vanilla-gnome-default-settings
vanilla-gnome-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
使用 Ubuntu DE 和 Gnome DE 时,此问题仍然存在。Gnome 设置本身似乎可以正常工作。在此之后,现在我在任何 apt 命令之后都会收到以下错误:
Setting up vanilla-gnome-default-settings (20.04.1) ...
update-alternatives: error: no alternatives for gdm3-theme.gresource
dpkg: error processing package vanilla-gnome-default-settings (--configure):
installed vanilla-gnome-default-settings package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of vanilla-gnome-desktop:
vanilla-gnome-desktop depends on vanilla-gnome-default-settings; however:
Package vanilla-gnome-default-settings is not configured yet.
dpkg: error processing package vanilla-gnome-desktop (--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:
vanilla-gnome-default-settings
vanilla-gnome-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试运行sudo dpkg --configure -a
,但发生了以下情况:
$ sudo dpkg --configure -a
Setting up vanilla-gnome-default-settings (20.04.1) ...
update-alternatives: error: no alternatives for gdm3-theme.gresource
dpkg: error processing package vanilla-gnome-default-settings (--configure):
installed vanilla-gnome-default-settings package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of vanilla-gnome-desktop:
vanilla-gnome-desktop depends on vanilla-gnome-default-settings; however:
Package vanilla-gnome-default-settings is not configured yet.
dpkg: error processing package vanilla-gnome-desktop (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
vanilla-gnome-default-settings
vanilla-gnome-desktop
我在 Gnome Boxes 中安装的 Ubuntu 21.10 上运行所有这些(使用内置操作系统下载选项下载)
答案1
我对此有一个手动修复。
编辑 ”
/var/lib/dpkg/info/vanilla-gnome-default-settings.postinst
”
gdm3-theme.gresource
改成”gdm-theme.gresource
”然后 ”
sudo apt install -f
”原始的 gnome 设置现在可以按预期工作。
您可以按如下方式修复它。
/var/lib/dpkg/info/vanilla-gnome-default-settings.postinst
用文本编辑器打开。查找
gdm3-theme.gresource
并替换为gdm-theme.gresource
運行
sudo apt -f install
去修復。
另外,这里有上述步骤的易于复制粘贴的一行版本:
sudo sed -i "s/gdm3-theme.gresource/gdm-theme.gresource/" /var/lib/dpkg/info/vanilla-gnome-default-settings.postinst && sudo apt -f install