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

在docker 使用apt dist-upgraded 更新时,出现pkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem,如何解决呢?

错误原因:是因为引用错误的链接导致的。
解决办法:切换到/var/lib/dpkg/updates目录,删除错误引用即可


root@742d07b16b2a:/home/ksnowlv/code/hello# cd /var/lib/dpkg/updates
root@742d07b16b2a:/var/lib/dpkg/updates# ls
0000  0001  0002  0003  0004  0005  0006  0007  0008  0009  0010  0011  0012  0013  0014  0015  0016  0017  0018  0019  tmp.i
root@742d07b16b2a:/var/lib/dpkg/updates# rm -r ./*
root@742d07b16b2a:/var/lib/dpkg/updates# ls
root@742d07b16b2a:/var/lib/dpkg/updates# apt dist-upgrade

你可能感兴趣的:(fix "dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem")