Skip to main content

(클라우드) dpkg frontend lock 에러 발생시 해결법

· 2 min read

에러 메시지

dpkg: error: dpkg frontend lock was locked by another process with pid 9634
Note: removing the lock file is always wrong, and can end up damaging the
locked area and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ>.

발생 원인

다른 프로그램(프로세스)에서 dpkg를 사용하고 있어 발생 하는 에러 입니다. 보통 백그라운드에서 패키지 업데이트 및 보안 업데이트 진행 시 발생 합니다.

해결 방법

보안 업데이트는 운영서버에서는 필수적으로 수행 하여야 하지만, 개발 서버에서는 필수는 아니기에 비활성화 합니다.

$ sudo systemctl -f stop unattended-upgrades #패지지 자동 업데이트 프로제스 종료하기
$ sudo apt remove unattended-upgrades # 패지지 자동 업데이트기능 제거 (재부팅 필요 할수 있음)
$ systemctl status unattended-upgrades # 비활성화 확인