AWS EC2 Ubuntu환경에서 /var/lib/apt/lists/lock - open (13: Permission denied) 에러 해결법

Jaewoong Mun·2023년 11월 30일
0

EC2환경에서 apt-get update 명령어를 사용하여 업데이트를 진행하려는 차에 다음과같은 에러가 발생했다.

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

뭔가 Permission denied면 뭔가 저 lock파일에 접근할 수 없다는 말이고 권한의 문제인거 같은데...
일단 구글링을통해 원인을 파악했다.

구글링을 해 보니 root로 실행하지 않아서 였다...

뭐야.... 나 sudo안붙였네...?

결론!

sudo apt-get update

위와같이 sudo를 붙여주자...ㅠㅠ

profile
한발짝 한발짝 앞으로...

0개의 댓글