HTTP
우분투 20.04.4 LTS 에서 nodejs v16 설치 방법
Zero_To_One
2022. 2. 24. 11:38
설치환경
Ubuntu 20.04.4 LTS
1.
sudo apt update
sudo apt upgrade
2.
sudo apt install -y curl
3.
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
4. 오류
> curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
무시:1 cdrom://Ubuntu 20.04.3 LTS _Focal Fossa_ - Release amd64 (20210819) focal InRelease
오류:2 cdrom://Ubuntu 20.04.3 LTS _Focal Fossa_ - Release amd64 (20210819) focal Release
이 CD를 APT에서 인식하려면 apt-cdrom을 사용하십시오. apt-get update로는 새 CD를 추가할 수 없습니다.
기존:3 http://packages.microsoft.com/repos/code stable InRelease
기존:4 https://dl.google.com/linux/chrome/deb stable InRelease
받기:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
기존:6 http://kr.archive.ubuntu.com/ubuntu focal InRelease
기존:7 http://kr.archive.ubuntu.com/ubuntu focal-updates InRelease
받기:8 http://kr.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
패키지 목록을 읽는 중입니다... 완료
E: The repository 'cdrom://Ubuntu 20.04.3 LTS _Focal Fossa_ - Release amd64 (20210819) focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Error executing command, exiting
5. 오류해결
소프트웨어&업데이트 -> ubuntu 소프트웨어 -> CD-Rom/DVD에서 설치 체크표시 없애기

6. 다시 실행
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
7.
sudo apt install -y nodejs
출처
https://joshtronic.com/2021/05/09/how-to-install-nodejs-16-on-ubuntu-2004-lts/
How to install Node.js 16 on Ubuntu 20.04 LTS by Josh Sherman
Ubuntu tends to drop a new version of their April release shortly after a new version of Node.js drops. Every other year, this Ubuntu release is a long-term support release, which has a longer shelf life in terms of support and maintenance compared to thei
joshtronic.com