刚刚在Ubuntu中准备安装一个工具包输入命令
sudo apt install net-tools
提示无法获得锁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?
这里应该是不允许同时开启两个apt-get的,所有只要把第一个apt-get关掉就好了
解决方案:
找出并杀掉所有apt-get或apt进程,运行 ps -ef | grep apt-get 命令查看相关进程,之后会看到有一串数字,那个是进程id,输入命令
sudo kill -9 进程id
之后就会杀掉相关进程id,然后就可以安装工具包了