安装ubuntun ssh遇到以下问题
magicdepth@magicdepth-UP-APL01:~$ sudo apt-get install openssh-server
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?
/var/lib/dpkg/lock文件被锁定 被其他进程使用,查看其他使用apt进程
magicdepth@magicdepth-UP-APL01:~$ ps afx|grep apt
2344 pts/7 S+ 0:00 | \_ grep --color=auto apt
2140 ? SNl 0:01 /usr/bin/python3 /usr/sbin/aptd
2148 ? SN 0:00 \_ /usr/lib/apt/methods/http
2149 ? SN 0:00 \_ /usr/lib/apt/methods/http
2153 ? SN 0:00 \_ /usr/lib/apt/methods/gpgv
2327 ? SN 0:01 \_ /usr/lib/apt/methods/store
将上述几个线程杀掉 解决问题
magicdepth@magicdepth-UP-APL01:~$ sudo kill -9 2148
magicdepth@magicdepth-UP-APL01:~$ sudo kill -9 2149
magicdepth@magicdepth-UP-APL01:~$ sudo kill -9 2153
magicdepth@magicdepth-UP-APL01:~$ sudo kill -9 2127
来源:CSDN
作者:Huo的藏经阁
链接:https://blog.csdn.net/weixin_42730667/article/details/103903228