
Amazon Image에 Node.js 설치 시 다음과 같은 오류가 떴다.
$ curl -fsSL https://rpm.nodesource.com/setup_lts.x | bash -
## Installing the NodeSource Node.js 18.x repo...
## Inspecting system...
+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release
+ uname -m
## You don't appear to be running a supported version of Enterprise Linux. Please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your architecture to be considered for support. Include your 'distribution package' name: no package provides redhat-release
no package provides centos-release
no package provides cloudlinux-release
no package provides sl-release
no package provides fedora-release.
다음을 실행하면 됨
1.Node.js 설치
$ set -xe && curl --silent --location https://rpm.nodesource.com/setup_16.x | bash -
$ sudo yum -y install nodejs
1번 과정은, Node.js를 시스템에 설치하기 위한 레파지토리 저장소를 설정하는 스크립트. 이 스크립트를 실행하면 시스템에 Node.js를 설치할 수 있는 저장소가 추가됨
Node.js를 실제로 설치하려면 'yum'이나 'apt-get'과 같은 패키지 매니저를 사용하여 Node.js 패키지를 설치해야 함. 저장소를 설정하는 스크립트를 실행한 후, yum install nodejs나 apt-get install nodejs와 같은 명령을 사용하여 Node.js 패키지를 설치할 수 있음
따라서, Node.js를 설치하려면 먼저 저장소를 설정하고, 그 다음에 패키지 매니저를 사용하여 Node.js 패키지를 설치해야 함
[출처] https://github.com/nodesource/distributions/issues/1524