apt-get upgrade 오류해결방법
VM(버추얼머신)을 사용해서 리눅스 환경을 체험하던중 제목과 같이 업데이트나 업그레이드를 받는중 오류가 발생하여 해결 후 원노트에 따로 정리를 해두었다.
sudo apt update(혹은 sudo apt-get update)를 수행한 후 sudo apt install upgrade를 하려고 할 때
E: Could not get 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?
이라는 오류가 발생할 때가 있다.
해결방법 1)
터미널에서 모든 프로세스를 죽인다.
sudo killall apt apt-get
그러나 다음과 같은 오류가 발생하는 경우가 있다.
apt: no process found
apt-get: no process found
해결방법 2)
디렉터리 삭제
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
마지막으로 sudo apt upgrade를 실행해주면 잘 설치된다.
출처: https://latte-is-horse.tistory.com/19 [라떼는말이야]