[error] apt-get update 에러 , apt install net-tools 설치 에러, could not get lock /var/lib/dpkg/lock
상황
초기 세팅된 ubuntu 18.04 환경에서
apt install net-tools 를 시도
설치 되지않고,
update하라고 해서 다시 update시도했으나,
설치 실패
error --> could not get lock /var/lib/dpkg/lock
해결
두가지 에러존재
1. apt-get update
2. apt install net-tools
1. apt-get update
아래 dns-nameserver와 nameserver를 추가를 해주면 정상적으로 작동
$ sudo vi /etc/network/interfaces
//(아래한줄 작성추가)
dns-nameservers 8.8.8.8 8.8.4.4
$ rm /etc/resolv.conf
$ sudo vi /etc/resolv.conf
//(아래 두줄 작성 추가)
nameserver 8.8.8.8
nameserver 8.8.4.4
2. apt install net-tools , could not get lock /var/lib/dpkg/lock
) sudo killall apt apt-get
// 나의 경우 진행중인 프로세스가 없다고 뜸...
//아래 3단계를 직접 삭제 해줘야 됨
- 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
해결
-끝-
참고자료
1.
Ubuntu apt-get update 에러 해결 방법
작업 환경 * Xen Server(XCP-ng Center 20.04.01) * Ubuntu 18.04 sudo apt-get update error ubuntu@ubuntu:~$ sudo apt-get update Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease Temporary failure..
blog.riyenas.dev
2.
https://kgu0724.tistory.com/71
리눅스 에러 Could not get lock /var/lib/dpkg/lock-frontend
이 글은 nodejs 설치시에 발생된 에러들입니다. E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend ..
kgu0724.tistory.com