我是 Linux 新手。我正在使用apt-get update
命令更新 Kali Linux,但它返回以下错误:
rookie@kali:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
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?
rookie@kali:~$
当我尝试打开社会工程师工具包时出现第二个错误:
答案1
使用 sudo 以 root 权限运行apt-get update
命令,如下所示:
sudo apt-get update
这样您就不会收到E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
错误消息。
要使用该apt-get upgrade
命令安装更新还需要使用 sudo,如下所示:
sudo apt-get upgrade