![你是 root 吗?](https://linux22.com/image/854273/%E4%BD%A0%E6%98%AF%20root%20%E5%90%97%EF%BC%9F.png)
如果我想通过以下方式安装程序:
sudo apt-get install package_name
我总是收到错误:
E: Could not open lock file /var/lib/apt/lists/lock - open (2 No such file or directory)
E: Unable to lock the administration directory (/var/lib/dpkg) , are you root?
我是 root,但仍然出现错误。有什么想法吗?
答案1
Ctrl按键盘上的+ Alt+启动终端T,将以下内容复制到终端窗口
sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
sudo apt-get update
或者你可以阅读更多详细信息这里