我意外删除了 tmp 文件夹。然后我无法访问浏览器,也无法从终端更新/升级。我设法为 tmp 授予 777 权限。但运行 sudo apt-get upgrade 时出现以下错误。
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for libreoffice-common (1:4.2.8-0ubuntu3) ...
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the download directory
E: Problem executing scripts DPkg::Post-Invoke 'apt-get clean'
E: Sub-process returned an error code
答案1
要重新创建 /tmp,您需要执行以下操作:
mkdir /tmp
sudo chmod 1777 /tmp
但
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
与 /tmp 无关。请参阅无法锁定管理目录(/var/lib/dpkg/),是否有另一个进程正在使用它?