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.
node.js - GLIBC_2.27 not found while installing Node on Amazon EC2 instance - Stack Overflow
Amazon Linux 2023 AMI update to libstdc++ with GLIBCXX_3.4.30
node.js - GLIBC version issue while installing npm on Amazon Linux 2023 - Stack Overflow
Building GCC 11.2 on Amazon Linux 2 - Stack Overflow
Try installing the active LTS version instead of latest with nvm install 16 (instead 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)
Update
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 node > 16 will need to move to newer amazon linux version, eg: https://github.com/amazonlinux/amazon-linux-2023/blob/main/Release-Notes-Amazon-Linux-2022.0.20220728.0.md
It seems like you are using v.18.0.0 which was the latest but not well-supported.
Try uninstalling that.
Copynvm uninstall 18.0.0
Install a version that is active.
Copynvm install 16.0.0
You should now be using v16 which should be well-supported.
You have duplicate packages, and maybe other corruptions too. Try these commands:
package-cleanup --cleandupes # Removes duplicate packages
rpm --rebuilddb # Rebuilds RPM database
yum reinstall glibc nss-softokn-freebl vim-filesystem
When that works, see if yum is happy:
yum check dependencies
If it's complaining about dependencies, install them first.
Please try
sudo yum clean all
sudo yum update
I’m trying to deploy a .NET 9 AOT lambda on provided.al2023. I see a runtime exception that shows the bootstrapper cannot find glibc 2.38.
I’m building the app through GitHub actions using Ubuntu 24.04.
Anybody knows how to get around this issue?