[Linux] install npm, error

깨미·2021년 7월 1일
0

💻 배워가기 💻

목록 보기
6/30
post-thumbnail

리눅스에서 npm을 설치하기 위해 sudo apt install npm를 입력하니 아래와 같은 에러가 났다.

Err:1 http://ports.ubuntu.com bionic-security/main armhf libpython2.7-minimal armhf 2.7.15-4ubuntu4~18.04.1
404 Not Found [IP: ]
Err:2 http://ports.ubuntu.com bionic-security/main armhf python2.7-minimal armhf 2.7.15-4ubuntu4~18.04.1
404 Not Found [IP: ]
Err:3 http://ports.ubuntu.com bionic-security/main armhf libpython2.7-stdlib armhf 2.7.15-4ubuntu4~18.04.1
404 Not Found [IP: ]
Err:4 http://ports.ubuntu.com bionic-security/main armhf python2.7 armhf 2.7.15-4ubuntu4~18.04.1
404 Not Found [IP: ]
Fetched 18.4 kB in 2s (10.8 kB/s)
E: Failed to fetch http://ports.ubuntu.com/pool/main/p/python2.7/libpython2.7-minimal_2.7.15-4ubuntu4~18.04.1_armhf.deb 404 Not Found [IP: ]
E: Failed to fetch http://ports.ubuntu.com/pool/main/p/python2.7/python2.7-minimal_2.7.15-4ubuntu4~18.04.1_armhf.deb 404 Not Found [IP: ]
E: Failed to fetch http://ports.ubuntu.com/pool/main/p/python2.7/libpython2.7-stdlib_2.7.15-4ubuntu4~18.04.1_armhf.deb 404 Not Found [IP: ]
E: Failed to fetch http://ports.ubuntu.com/pool/main/p/python2.7/python2.7_2.7.15-4ubuntu4~18.04.1_armhf.deb 404 Not Found [IP: ]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

apt-get update를 실행하여 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)

npm을 설치할때는 잘만 붙였던 sudo를 붙이지 않았기 때문이다. 😅

sudo apt-get update
sudo apt install npm

차례로 실행하니 아주 잘된다~

sudo는 superuser do.
root 권한을 이용하여 명령어를 실행할 수 있음.

profile
vis ta vie

0개의 댓글