尝试运行更新和升级时出错

尝试运行更新和升级时出错

我跑

sudo apt update 

结果 19 个包

sudo apt upgrade

结果

dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

(以前从未见过)遵循这些说明是否安全?

答案1

是的,可以安全运行sudo dpkg --configure -a

来自dpkg 手册页

--configure package... |-a|
If -a or --pending is given instead of package, all unpacked but unconfigured packages are configured.

Configuring consists of the following steps:

   1.  Unpack the conffiles, and at the same time back up the old
              conffiles, so that they can be restored if something goes wrong.

   2. Run postinst script, if provided by the package.

相关内容