apt-get 出现错误

apt-get 出现错误

当我使用时:

sudo apt-get upgrade

我收到此错误:

E: Could not open file /var/lib/dpkg/status - open (2: No such file or directory)

E: The package lists or status file could not be parsed or opened.

我用 :sudo dpkg --configure -a

我得到了这个:

dpkg: error: failed to open package info file `/var/lib/dpkg/status' for reading: No such file or directory

答案1

尝试逐步按照命令操作。

sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status

sudo mkdir /var/lib/apt/lists/partial 

sudo dpkg --clear-avail

现在尝试

sudo apt-get update && sudo apt-get upgrade

相关内容