无法在 Ubuntu 18.04 上安装和更新许多内容

无法在 Ubuntu 18.04 上安装和更新许多内容

我无法在 Ubuntu 18.04 上安装和更新许多东西,因为终端总是显示:

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

答案1

您需要运行更新命令apt-get updateapt-get upgrade使用超级用户(即 root 权限)

sudo apt-get update
sudo apt-get upgrade

相关内容