![安装 vim 时发生错误](https://linux22.com/image/993866/%E5%AE%89%E8%A3%85%20vim%20%E6%97%B6%E5%8F%91%E7%94%9F%E9%94%99%E8%AF%AF.png)
输入后sudo apt-get install vim
,我得到:
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
答案1
尝试依次运行这 2 个命令
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
基本上这两个命令就是删除锁。
输入后sudo apt-get install vim
,我得到:
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
尝试依次运行这 2 个命令
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
基本上这两个命令就是删除锁。