Debian和ubuntu apt-get 安装意外中断后导致资源被锁,及screen用法
错误提示:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
解决办法:
sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock 最后提醒安装前记得screen 一下!这样网络中断也可以接着运行 screen -S yourname -> 新建一个叫yourname的session screen -ls -> 列出当前所有的session screen -r yourname -> 回到yourname这个session screen -d yourname -> 远程detach某个session screen -d -r yourname -> 结束当前session并回到yourname这个session