I ran into an error deploying some changes to my platform hooks, which were to install NodeJS 18, but deployment failed because this is incompatible with the current platform. So I decided to do the usual solution: deploy the previous application version, which has hook scripts to install NodeJS 15 instead. However when I did this, deployment failed again with the same error message: "Error: Package: 2:nodejs-18.20.2-1nodesource.x86_64 (nodesource-nodejs) Requires: libc.so.6(GLIBC_2.28)(64bit)", as if ElasticBeanstalk were running the new, bugged hook scripts instead of the old ones in the application version that I wanted to deploy.
I have also tried using the EB CLI to deploy the previous version of the application with the older, working hooks, but the logs report the same error. I know the platform is retired, but I cannot update it at this time, because I risk major incompatibilities with the site. Up until now, deployment and deploying old application versions has not been an issue. The EC2 instances are managed with an Application Load Balancer, and I am unable to SSH directly to any instance to rectify the problem that way.
Now the entire website has been down for over an hour and I cannot restore it, because EB is running the wrong platform hook scripts, and will not recognize any changes that I make to the hooks. How can I actually restore my website? I'm happy to provide any further clarifying information or log messages that will help resolve this issue quickly, but again: I cannot update the platform at this time. Thank you.
Update: despite accessing the instances via SSH and totally removing nodejs from the yum install command, deployment is still trying to install node with yum. How do I remove or replace the hook scripts?
Here are the relevant lines in the prebuild hook shell script
# Install necessary packages.
yum install -y git htop zsh tmux nfs-utils rpcbind libtool jq util-linux-user amazon-efs-utils system-rpm-config docker unzip
# Use nvm for nodejs
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash -
nvm install '15'
and the result in the logs
2024/05/01 15:07:43.781980 [INFO] Error: Package: 2:nodejs-18.20.2-1nodesource.x86_64 (nodesource-nodejs)
Requires: libm.so.6(GLIBC_2.27)(64bit)
I've explicitly removed nodejs through yum on all instances and the load balancer just to be sure.