![已解决升级错误:非法包名称“systemd/noawait”](https://linux22.com/image/1181935/%E5%B7%B2%E8%A7%A3%E5%86%B3%E5%8D%87%E7%BA%A7%E9%94%99%E8%AF%AF%EF%BC%9A%E9%9D%9E%E6%B3%95%E5%8C%85%E5%90%8D%E7%A7%B0%E2%80%9Csystemd%2Fnoawait%E2%80%9D.png)
当我运行此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的空白处。