可以看到,/var/lib/dpkg/lock-frontend这个资源不可用,被进程所占用,导致安装失败。
尝试把他删除,
sudo rm /var/lib/dpkg/lock-frontend
然后重新执行安装命令。
执行之后,发现还有另一个资源也被占用
同样,我们也把他删除,
sudo rm /var/lib/dpkg/lock
再执行安装命令,安装成功!