This does not seem helpful. For example every Lambda image (at the time of this writing ex: NodeJS v16) seems to have a version of glibc v2.2.6 released on 2017-08-02. We need a way to update glibc now? Answer from MetaSkills on repost.aws
Discussions

node.js - GLIBC_2.27 not found while installing Node on Amazon EC2 instance - Stack Overflow
Try installing the active LTS version ... of nvm install node) as per the examples. This was tested on the docker image amazonlinux:2 and correlates to what AWS CDK supports (ref) ... LTS has moved on for node, however, as per @djvg's comment, note there is a limitation with amazon linux 2 on glibc, so if requiring ... More on stackoverflow.com
🌐 stackoverflow.com
How to upgrade glibc on Amazon Linux 2 AMI
I am trying to run a Python Docker image that is using glibc 2.28 and is running into conflicts since the 2.26 version is being used in the instance. This is weird. You should be packaging glibc at the version you need it in the container image, and there's no reason for it to use the host's. More on reddit.com
🌐 r/aws
1
5
March 1, 2022
How To Install glibc-devel.i686 on Amazon Linux 2
의존 라이브러리 설치를 위해, 32bit용 컴파일러가 필요한 상황입니다. (glibc-devel.i686, libstdc++-devel.i686) Amazon Linux 2에서 기본 제공하는 패키지에는 없는데, 설치할 방법이 있을까요? More on repost.aws
🌐 repost.aws
2
0
December 14, 2022
Install on Amazon Linux EC2 fails. 'Requires: libc.so.6(GLIBC_2.34)(64bit)'
1. Output of caddy version: N/A (can’t install it) 2. How I run Caddy: N/A (cannot install it) a. System environment: Amazon Linux, AWS EC2 AMI: amzn2-ami-kernel-5.10-hvm-2.0.20221103.3-x86_64-gp2 I have Docker set up but tried to use Yum, as suggested in Caddy installation page b. Command: ... More on caddy.community
🌐 caddy.community
7
0
December 9, 2022
🌐
Installati.one
installati.one › home › amazonlinux › 2nd › how to install glibc.x86_64 on amazon linux 2
How To Install glibc.x86_64 on Amazon Linux 2 | Installati.one
May 20, 2022 - In this tutorial we learn how to install glibc.x86_64 in Amazon Linux 2. glibc.x86_64 is The GNU libc libraries
🌐
Reddit
reddit.com › r/aws › how to upgrade glibc on amazon linux 2 ami
r/aws on Reddit: How to upgrade glibc on Amazon Linux 2 AMI
March 1, 2022 -

On EC2 instances using Amazon Linux 2, an outdated version of glibc is used: glibc 2.26. That is backed up by the FAQ for Amazon Linux 2. FAQ for Amazon Linux 2.

A set of core packages including systemd, GCC 7.3, Glibc 2.26, Binutils 2.29.1 that receive Long Term Support (LTS) from AWS.

Is there any way to upgrade to a newer version of Glibc, like 2.28? For background, I am trying to run a Python Docker image that is using glibc 2.28 and is running into conflicts since the 2.26 version is being used in the instance.

🌐
AWS re:Post
repost.aws › questions › QUBAUN3DPvTgqJyOIFa_x8wQ › how-to-install-glibc-devel-i686-on-amazon-linux-2
How To Install glibc-devel.i686 on Amazon Linux 2 | AWS re:Post
December 14, 2022 - [root@ip-172-31-12-167 ~]# yum install glibc.i?86 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd Resolving Dependencies --> Running transaction check ---> Package glibc.i686 0:2.26-64.amzn2.0.2 will be installed --> Finished ...
Top answer
1 of 5
5

The answer at:
Node.js 18 is compiled for glibc 2.28
is certainly correct although highly unsatisfying.

You cannot run the binary on your system because it relies on a version of glibc which is not available on your system.

$ docker run -it amazoncorretto:11 bash
bash-4.2# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
bash-4.2# rpm -q --provides glibc|grep -i libc.so
libc.so.6()(64bit)
libc.so.6(GLIBC_2.10)(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.12)(64bit)
libc.so.6(GLIBC_2.13)(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.15)(64bit)
libc.so.6(GLIBC_2.16)(64bit)
libc.so.6(GLIBC_2.17)(64bit)
libc.so.6(GLIBC_2.18)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.2.6)(64bit)
libc.so.6(GLIBC_2.22)(64bit)
libc.so.6(GLIBC_2.23)(64bit)
libc.so.6(GLIBC_2.24)(64bit)
libc.so.6(GLIBC_2.25)(64bit)
libc.so.6(GLIBC_2.26)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.2)(64bit)
libc.so.6(GLIBC_2.3.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.5)(64bit)
libc.so.6(GLIBC_2.6)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libc.so.6(GLIBC_2.8)(64bit)
libc.so.6(GLIBC_2.9)(64bit)

It supports only up to GLIBC_2.26.

Also amazoncorretto:latest only supports up to glibc 2.26:

$ docker run -it amazoncorretto bash
bash-4.2# cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
bash-4.2# rpm -q --provides glibc|grep -i libc.so
libc.so.6()(64bit)
libc.so.6(GLIBC_2.10)(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.12)(64bit)
libc.so.6(GLIBC_2.13)(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.15)(64bit)
libc.so.6(GLIBC_2.16)(64bit)
libc.so.6(GLIBC_2.17)(64bit)
libc.so.6(GLIBC_2.18)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.2.6)(64bit)
libc.so.6(GLIBC_2.22)(64bit)
libc.so.6(GLIBC_2.23)(64bit)
libc.so.6(GLIBC_2.24)(64bit)
libc.so.6(GLIBC_2.25)(64bit)
libc.so.6(GLIBC_2.26)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.2)(64bit)
libc.so.6(GLIBC_2.3.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.5)(64bit)
libc.so.6(GLIBC_2.6)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libc.so.6(GLIBC_2.8)(64bit)
libc.so.6(GLIBC_2.9)(64bit)

You cannot update your glibc library because it is part of the Linux Kernel. It will be upgraded when you migrate to a newer Operating System Version.

The way to get it running on your system would be to rebuild it from the Source Code for your system and ideally package it for easily reproducible installation.

You might setup a docker image from amazoncorretto Base Image with the Packaging Environment set up.

An Package build on the Packaging Docker Host will be installable on all amazoncorretto:11 Systems.

Useful will be the pre-built .spec file which can be found at:
NodeJS .spec file
Then you only need to build your rpmbuild environment to create your installable NodeJS .rpm package.

AWS NodeJS Lambda Runner:

@Rich mentioned the public.ecr.aws/lambda/nodejs:18 AWS Lambda Runner image.
This is an image which is designed to run NodeJS tasks with the CMD dockerfile instruction at startup.
This actually might be fine for some single shot task (what it is designed for) or to startup directly a ExpressJS web app.
A downside is that you cannot independently update the NodeJS engine without upgrading the whole base image because the NodeJS engine is not installed as a system package.


$ docker run -it public.ecr.aws/lambda/nodejs:18 
19 Jun 2023 09:53:51,148 [INFO] (rapid) exec '/var/runtime/bootstrap' (cwd=/var/task, handler=)


^C19 Jun 2023 09:54:26,776 [INFO] (rapid) Received signal signal=interrupt
19 Jun 2023 09:54:26,776 [INFO] (rapid) Shutting down...
19 Jun 2023 09:54:26,776 [WARNING] (rapid) Reset initiated: SandboxTerminated
19 Jun 2023 09:54:26,776 [INFO] (rapid) Stopping runtime domain
19 Jun 2023 09:54:26,776 [INFO] (rapid) Waiting for runtime domain processes termination
19 Jun 2023 09:54:26,776 [INFO] (rapid) Stopping operator domain
19 Jun 2023 09:54:26,776 [INFO] (rapid) Starting runtime domain
$ docker run --entrypoint bash -it public.ecr.aws/lambda/nodejs:18
bash-4.2# rpm -qa|grep -i node|wc -l
0
bash-4.2# node --version
v18.16.0
bash-4.2# npm --version
9.5.1
bash-4.2# cat /lambda-entrypoint.sh
#!/bin/sh
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.

if [ $# -ne 1 ]; then
  echo "entrypoint requires the handler name to be the first argument" 1>&2
  exit 142
fi
export _HANDLER="$1"

RUNTIME_ENTRYPOINT=/var/runtime/bootstrap
if [ -z "${AWS_LAMBDA_RUNTIME_API}" ]; then
  exec /usr/local/bin/aws-lambda-rie $RUNTIME_ENTRYPOINT
else
  exec $RUNTIME_ENTRYPOINT
fi
bash-4.2# ls -lah /usr/local/bin/aws-lambda-rie
-rwxr-xr-x 1 root root 5.6M Jun 12 13:21 /usr/local/bin/aws-lambda-rie
bash-4.2# ls -lah /etc/yum.repos.d
total 12K
drwxr-xr-x 2 root root 4.0K Jun 23  2022 .
drwxr-xr-x 1 root root 4.0K Jun 19 09:57 ..
-rw-r--r-- 1 root root 1003 Oct 26  2021 amzn2-core.repo
2 of 5
4

Building up on the answer by Bodo Hugo Barwich and the comment by Rich:

If you do not want to use the Docker image public.ecr.aws/lambda/nodejs:18 directly, you can copy node from that image to your own image via multi-stage build:

FROM public.ecr.aws/lambda/nodejs:18 as nodesource

FROM amazonlinux:2
ENV PATH="$PATH:/var/lang/bin"
COPY --from=nodesource /var/lang /var/lang

RUN npm i whatever
🌐
Caddy Community
caddy.community › help
Install on Amazon Linux EC2 fails. 'Requires: libc.so.6(GLIBC_2.34)(64bit)' - Help - Caddy Community
December 9, 2022 - 1. Output of caddy version: N/A (can’t install it) 2. How I run Caddy: N/A (cannot install it) a. System environment: Amazon Linux, AWS EC2 AMI: amzn2-ami-kernel-5.10-hvm-2.0.20221103.3-x86_64-gp2 I have Docker set…
Find elsewhere
🌐
GitHub
github.com › aws › firelens-datajet › issues › 23
Install instructions did not work on Amazon Linux · Issue #23 · aws/firelens-datajet
November 21, 2022 - It seems NVM requires glibc 2.27 or 2.28. Amazon Linux only supports glibc 2.26 at the moment: https://repost.aws/questions/QUrXOioL46RcCnFGyELJWKLw/glibc-2-27-on-amazon-linux-2
Author   aws
🌐
GitHub
github.com › aws › q-command-line-discussions › discussions › 195
Support Older GLibc 2.26 (Amazon Linux 2) · aws/q-command-line-discussions · Discussion #195
❯ ./q/install.sh /home/aljoh...ocal/bin/q) /home/aljohri/.local/bin/q: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /home/aljohri/.local/bin/q) Try to install Amazon Q on any Amazon Linux 2 machine....
Author   aws
🌐
Tenable
tenable.com › plugins › nessus › 171823
Amazon Linux 2 : glibc (ALAS-2023-1944)<!-- --> | Tenable®
February 17, 2023 - Run 'yum update glibc' to update your system. https://alas.aws.amazon.com/AL2/ALAS-2023-1944.html · https://alas.aws.amazon.com/cve/html/CVE-2019-19126.html · https://alas.aws.amazon.com/cve/html/CVE-2020-10029.html · https://alas.aws.amazon.com/cve/html/CVE-2020-1752.html ...
🌐
AWS re:Post
repost.aws › questions › QUTMOyTk4MT0KJB947GyFIAw › i686-package-on-amazon-linux-2023
i686 package on amazon linux 2023 | AWS re:Post
October 1, 2023 - Sadly, glibc.i686 was removed from Amazon Linux 2023. Moreover, Amazon Linux 2023 doesn't support EPEL repositories. Therefore, seems that it is better to use Amazon Linux 2 in your case. (Although you may try to download each of the i686 dependencies directly from other repositories if you really want to use AL2023) ... How do I update yum or install packages without internet access on my EC2 instances that run Amazon Linux?
🌐
Stack Overflow
stackoverflow.com › questions › 77788652 › install-node-in-ec2-with-amazon-linux2-error-glibc-2-28
node.js - Install node in ec2 with Amazon Linux2 error glibc >= 2.28 - Stack Overflow
cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/" SUPPORT_END="2025-06-30" And no matter I use : curl -sL https://rpm.nodesource.com/setup_xxx.x | sudo -E bash - or nvm option, I get: Resolving Dependencies --> Running transaction check ---> Package nodejs.x86_64 2:18.19.0-1nodesource will be installed --> Processing Dependency: glibc >= 2.28 for package: 2:nodejs-18.19.0-1nodesource.x86_64 --> Processing Dependenc