apt-get 실행 시 Could not get lock /var/lib/dpkg/lock-frontend 발생

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?

apt-get install '...' 실행 시 위와 같은 에러 현상이 종종 나타날 때가 있다.

그렇다면, 먼저 아래 명령어를 이용해 혹시 실행 중일지 모를 apt, apt-get 프로세스를 죽여준다.


sudo killall apt apt-get


그래도 위 에러가 해결되지 않았다면,


sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*

sudo dpkg --configure -a

sudo apt update


를 커맨드 라인에 입력하면 대부분 해결된다.

댓글