ubuntu 16.04 apt 软件包更新出错的解决方法

当我们使用apt(或者apt-get)命令进行软件包更新的时候,常常会因为网络等原因导致上一次apt更新未终止,而导致出现错误提示11.这个时候可以用本文的方法进行解决,非常有效!

错误提示:

sudo apt update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
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/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock

感谢:
感谢网络上大神们的经验分享,尤其是这一篇帖子
http://www.linuxidc.com/Linux/2010-02/24349.htm

你可能感兴趣的:(ubuntu 16.04 apt 软件包更新出错的解决方法)