ubuntu报错: - RemoveCaches (13: Permission denied)

完整报错内容显示如下:

Reading package lists... Done
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)

ubuntu报错: - RemoveCaches (13: Permission denied)_第1张图片

报错原因

权限不够,切换到root账户下。
执行修改root密码的命令:sudo passwd root
ubuntu报错: - RemoveCaches (13: Permission denied)_第2张图片
密码修改成功之后,执行命令:su
ubuntu报错: - RemoveCaches (13: Permission denied)_第3张图片
输入刚才修改的密码,再执行原来要执行的指令即可。

你可能感兴趣的:(报错,ubuntu,linux,运维)