AL2 기반의 EC2에서 Node.js 18 LTS를 지원하지 않음 - kdevkr/mambo-box GitHub Wiki
Amazon Linux 2 기반으로 실행된 젠킨스 서버에서 Node.js 18 LTS 버전을 사용하여 프론트엔드 코드를 빌드하려고 했으나 아래와 같은 오류가 발생했다.
# Node.js 18 LTS 설치
[ec2-user@ip-10-0-2-131 ~]$ nvm install v18
Downloading and installing node v18.16.0...
Downloading https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-x64.tar.xz...
################################################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v18.16.0 (npm v)
Creating default alias: default -> v18 (-> v18.16.0)
[ec2-user@ip-10-0-2-131 ~]$ node --version
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node
# GLIBC 버전 확인 명령어
[ec2-user@ip-10-0-2-131 ~]$ ldd --version
ldd (GNU libc) 2.26
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Solutions
Amazon Linux 2에서는 GLIBC 2.6 버전을 지원하므로 Amazon Linux 2023 기반으로 EC2 서버를 실행해야한다.