문제점
apt update && apt upgrade -y 업그레이드 시도시 cache lock 이 걸린 에러가 발생하며 명령을 수행하지 않음
root@ubuntu:~# apt update && apt upgrade -y
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
130 packages can be upgraded. Run 'apt list --upgradable' to see them.
^Citing for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 22186 (unattended-upgr)... 67s
해결방법
아래 명령으로 lock파일 삭제 후 다시 apt update && apt upgrade -y 수행
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
반응형
'인프라' 카테고리의 다른 글
텔레그램 봇(telelgram bot) 채팅방 만들기 (1) | 2022.05.06 |
---|---|
Command "python setup.py egg_info" failed with error code 1 (0) | 2022.04.22 |
mysql replication (리플리케이션) 설정 (0) | 2022.04.16 |
Failing package is: mysql-community-libs-compat-5.7.37-1.el7.x86_64 (0) | 2022.04.15 |
sysmon winlogbeat elk 연동하기 (0) | 2022.04.14 |
댓글