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.
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?
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.
are there any significant differences between Amazon Linux 2 and CentOS? I know amazon Linux 2 is built on CentOS and I am told has better networking performance but are the same packages available, does systemctl function the same are any pitfalls that I should be aware of?
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