在 Ubuntu 18.04 的最小安装中,我尝试通过运行以下命令切换到香草 gnome 桌面:
sudo apt-get install vanilla-gnome-desktop
由于此错误,此安装失败。此问题导致所有 apt-get install 和 apt-get upgrade 失败。
我尝试使用以下命令删除损坏的软件包,但无济于事:
hugh@xps:~$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up gnome-session (3.28.1-0ubuntu3) ...
update-alternatives: error: cannot stat file '/etc/alternatives/gdm3.css': Invalid argument
dpkg: error processing package gnome-session (--configure):
installed gnome-session package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
gnome-session
E: Sub-process /usr/bin/dpkg returned an error code (1)
和:
hugh@xps:~$ sudo dpkg --remove --force-remove-reinstreq gnome-session
(Reading database ... 166375 files and directories currently installed.)
Removing gnome-session (3.28.1-0ubuntu3) ...
update-alternatives: error: cannot stat file '/etc/alternatives/gdm3.css': Invalid argument
dpkg: error processing package gnome-session (--remove):
installed gnome-session package pre-removal script subprocess returned error exit status 2
Errors were encountered while processing:
gnome-session
和
hugh@xps:~$ sudo apt-get install --reinstall gnome-session
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for gnome-session:amd64
通常/etc/alternatives/gdm3.css指向/usr/share/gnome-shell/theme/ubuntu.css。后一个文件位于
gnome-shell-common
package中。您可以使用以下方法重新安装它:
如果它不起作用,您可以尝试通过手动重新创建链接来解决问题
然后运行