apt-get install vim时,提示:
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (20: Not a directory)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
但是我发现我/var/lib下面根本就没有dpkg的目录,目前具体原因不清楚,执行了下面命令之后就可以了。
1. sudo mkdir -p /var/lib/dpkg/{alternatives,info,parts,triggers,updates}
2. sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
3. apt-get download dpkg
转自:https://blog.csdn.net/qq_33392383/article/details/86415037