缺少‘/usr/share/plymouth/themes/details’:升级软件包时没有该文件或目录

缺少‘/usr/share/plymouth/themes/details’:升级软件包时没有该文件或目录

我在 Ubuntu 19.10 上使用内核版本 5.46(我猜是最新版本)的 KDE plasma 5.18 DE。

cp: cannot stat '/usr/share/plymouth/themes/details': No such file or directory运行 时出现错误。但是我认为这是我在运行和apt upgrade时无意中执行的,目的是删除所有 plymouth 主题。但是它们不是通过这种方式删除的,所以我使用 删除了它们,因此它删除了使用 apt 安装的主题。然后我安装了一些自定义 plymouth 主题和一些存储库中的主题,并使用 对其进行了配置。下一个问题是启动或关闭时 plymouth 主题不显示。我认为这是因为我删除了文件,破坏了 plymouth 系统。我该怎么办?sudo rm -r /usr/share/plymouth/themes/*sudo rm -r /lib/plymouth/themes/*sudo apt remove plymouth-theme*sudo update-alternatives --config default.plymouth

这是完整的错误消息。

sakithbk@Sakith-Laptop:~$ sudo apt upgrade
[sudo] password for sakithbk: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  metasploit-framework (ignore this)
0 upgraded, 0 newly installed, 0 to remove and 1 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 initramfs-tools (0.133ubuntu10) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.133ubuntu10) ...
update-initramfs: Generating /boot/initrd.img-5.3.0-46-generic
cp: cannot stat '/usr/share/plymouth/themes/details': No such file or directory (<-- here)
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.3.0-46-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

任何帮助都将受到赞赏。

编辑

忘了说我删除主题的意图。我遇到了一个问题,一些普利茅斯主题无法正常工作,启动时显示配置的主题(我选择的那个),关机时显示另一个主题(文本普利茅斯主题)。所以我认为如果我删除并重新安装它们,这个问题就会得到解决。

答案1

您必须使用以下命令重新安装相应的软件包

sudo apt-get install --reinstall \
$(dpkg -S /usr/share/plymouth/themes/details | awk '{print $1}' | sort -u | sed "s/://")

并重新安装输出中提到的所有软件包

dpkg -S /usr/share/plymouth/

相关内容