我尝试使用命令“apt-get update”,但它给出了这个错误。它不是唯一一个给出此类错误的命令。
apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
我该如何修复它?
答案1
您需要以 root 身份运行该命令:
sudo apt-get update
sudo apt-get upgrade