最近收了一个pacificrack.com家的小鸡,遇到各种问题,
当你执行sudo apt-get XXX
这种命令时出现类似下面的输出错误:
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?
解决方案:
ps -A | grep apt-get
root 752 0.0 0.0 4508 1628 ? Ss 01:13 0:00 /bin/sh /usr/lib/apt/apt.systemd.daily
apt 951 0.1 0.1 49572 5524 ? S 01:18 0:06 /usr/lib/apt/methods/http
sudo kill 951
重新打开ssh:
sudo dpkg --configure -a
ok,可以使用了
sudo apt update && sudo apt dist-upgrade && sudo apt autoremove
sudo apt install update-manager-core#(不一定用到)
sudo do-release-upgrade -d #升级到18.04(不一定用到)
1碰到依赖使用:
sudo apt-get install -f