问题一:

通过sudo命令更新文件时,dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

报如下的错误:

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

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

原因:

需删除目录/var/lib/dpkg下的文件夹lock和updates

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

解决办法:

1、通过rm -rf命令删除这两个文件夹

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

 

2、sudo apt clean:清除apt缓存

3、sudo apt update:再次更新程序

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

 

问题二:但是此时重新执行命令会报以下的错误

cannot scan updates directory '/var/lib/dpkg/updates/': No such file or directory

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

 

解决办法:

依次执行以下命令

1、sudo mkdir -p /var/lib/dpkg/updates

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

 

2、sudo mkdir -p /var/lib/dpkg/updates

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

 

3、sudo apt-get purge wine1.4 ia32-libs-multiarch

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

4、sudo apt-get upgrade

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

相关文章: