apt-get lock(虚拟机进程锁死)解决方法

上课应计算机组成原理老师要求安装Ubuntu虚拟机做一些相关实验,有一次打开虚拟机下载mdadm。然后发现无法下载,一查原因可能是上次运行更新或安装没有正常完成导致进程占用,解决方法是杀死正在进行的进程。
下面是我当时尝试解决时出现的一些小问题。
sudo apt-get install mdadm
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock ( /var/lib/dpkg/lock - frontend), is another process using it?
虚拟机报错情况看似成功了,其实还是没有解决
最后我使用了指令
sudo systemctl --force --force reboot
执行完之后重启虚拟机就好了。

猜你喜欢

转载自blog.csdn.net/weixin_43499182/article/details/89021845