已解决升级错误:非法包名称“systemd/noawait”

已解决升级错误:非法包名称“systemd/noawait”

当我运行此sudo apt upgrade命令时,我得到以下信息:

Reading package list ... Done
Creating dependency tree
Reading status information ... Done
Calculating the update ... Done
The following packages will be updated:
  linux-libc-dev

1 updates, 0 new ones will be installed, 0 to remove and 0 not to update.

39 not fully installed or removed.
0 B / 1,141 kB of files need to be downloaded.
12.3 kB of additional disco space will be used after this operation.
do you wish to continue? [Y / n] yes

dpkg: error: trigger log file mentions a package name
Illegal you `systemd / noawait '(in the file` / usr / lib / systemd / catalog'): name
Illegal packet in value 'systemd / noawait': character `/ 'is not allowed
gone (only letters, digits characters `- + ._ 'are allowed)
E: The / usr / bin / dpkg thread returned an error code (2)

我无法升级:((

请帮忙。我用的是 ubuntu 20.04

答案1

解决方案是在文件/var/lib/dpkg/triggers/File中,你必须用 来查找这个触发器sudo gedit /var/lib/dpkg/triggers/File,然后我们查找/usr/lib/systemd/catalog system/noawait,然后我们将其删除,这样我们就解决了错误,如果出现这样的错误dpkg: error: syntactic error in trigger file /var/lib/dpkg/triggers/File '...... 错误是在文件/var/lib/dpkg/triggers/File的空白处。

相关内容