命令行运行:sudo apt-get update更新软件源时,中途按Ctrl+C有时会导致异常停止。
此时在下次更新software souces时会报错:
allen@allen-lql ~ $ sudo apt-get 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/
解决办法是将“/var/lib/apt/lists/lock”删除即可:
allen@allen-lql ~ $ sudo rm /var/lib/apt/lists/lock
如此我们便可以重新更新软件源了。