728x90
ubuntu "Could not get lock" APT 오류
apt 패키지 설치 시 에러
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 14185 (apt)
[방법 1]
apt 프로세스 확인
ps aux | grep -i apt
$ ps aux | grep -i apt
root 14185 0.0 0.3 74864 65204 pts/1 S+ 17:53 0:00 apt install -y php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath
root 17765 0.0 0.1 74864 18816 pts/1 S+ 17:53 0:00 apt install -y php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath
root 17773 0.0 0.0 7368 3552 pts/1 S+ 17:53 0:00 sh -c test -x /usr/lib/needrestart/apt-pinvoke && /usr/lib/needrestart/apt-pinvoke || true
root 17967 0.0 0.0 6476 2340 pts/3 S+ 18:17 0:00 grep --color=auto -i apt
apt 프로세스 kill
killall apt apt-get
[방법 2]
잠금 파일 삭제(Delete Lock Files)
rm /var/lib/apt/lists/lock /var/cache/apt/archives/lock /var/lib/dpkg/lcok*
dpkg 재구성(Reconfigure dpkg)
dpkg --configure -a
apt update
728x90
'리눅스' 카테고리의 다른 글
docker efk stack(elasticsearch cluster) (0) | 2022.06.22 |
---|---|
MongoDB PHP Driver를 설치하는 방법 (0) | 2022.06.22 |
[리눅스] PHP zip 확장(Extension) 모듈 설치 (0) | 2022.06.15 |
[리눅스] dockerfile docker-php-ext-install, docker-php-ext-enable, docker-php-ext-configure 명령 (0) | 2022.06.13 |
mongodb와 mongo-express를 Docker Compose를 사용하여 실행하는 방법 (0) | 2022.06.09 |