![如何正确使用更新替代方案?](https://linux22.com/image/162060/%E5%A6%82%E4%BD%95%E6%AD%A3%E7%A1%AE%E4%BD%BF%E7%94%A8%E6%9B%B4%E6%96%B0%E6%9B%BF%E4%BB%A3%E6%96%B9%E6%A1%88%EF%BC%9F.png)
我只是想vanilla-gnome-desktop
通过以下方式安装
apt install vanilla-gnome-desktop
...为了获得比 Ubuntu Desktop 18.04 上的默认设置更普通的 GNOME 体验。
它第一次就出错了,并且该问题似乎无法apt install
仅通过以下任一方法来解决:
# apt install vanilla-gnome-desktop
Reading package lists... Done
Building dependency tree
Reading state information... Done
vanilla-gnome-desktop is already the newest version (0.83).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up plymouth-theme-ubuntu-gnome-logo (18.04.0) ...
update-alternatives: error: alternative link /usr/share/plymouth/themes/default.grub is already managed by default.grub
dpkg: error processing package plymouth-theme-ubuntu-gnome-logo (--configure):
installed plymouth-theme-ubuntu-gnome-logo package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
plymouth-theme-ubuntu-gnome-logo
E: Sub-process /usr/bin/dpkg returned an error code (1)
所以无论如何,我之前已经清除了软件包plymouth-theme-ubuntu-logo
并且plymouth-theme-ubuntu-text
已安装 plymouth-disabler
。
我还为自己创建了一个小文件,/etc/grub-black-and-white
其中包含:
if background_color 0,0,0,0; then
clear
fi
我通过它“安装”了
update-alternatives --install /usr/share/plymouth/themes/default.grub default.grub /etc/grub-black-and-white 100
但是,我必须删除该 ( update-alternatives --remove default.grub /etc/grub-black-and-white
) 才能plymouth-theme-ubuntu-gnome-logo
正确安装,从而解决上述问题。
但现在当我想重新实例化我的固定/usr/share/plymouth/themes/default.grub
,指向 时/etc/grub-black-and-white
,它再次抱怨:
# update-alternatives --install /usr/share/plymouth/themes/default.grub default.grub /etc/grub-black-and-white 100
update-alternatives: error: alternative link /usr/share/plymouth/themes/default.grub is already managed by default.plymouth
虽然我显然可以再次手动覆盖它,但我的目标是让我的设置优先于某些包选择的任何/usr/share/plymouth/themes/default.grub
内容坚持。
有没有办法实现这一点update-alternatives
?如何?