nodejs-16 dependency issue with libuv

Viewed 2465

This is what I'm getting on my Amazon Linux 2 instance while trying to run yum update.

Do you suggest I use --skip-broken or wait until AWS rolls out a fix?

--> Processing Dependency: libuv >= 1:1.42.0 for package: 1:nodejs-16.13.2-8.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 1:nodejs-16.13.2-8.el7.x86_64 (epel-testing)
           Requires: libuv >= 1:1.42.0
           Installed: 1:libuv-1.39.0-1.amzn2.x86_64 (@amzn2-core)
               libuv = 1:1.39.0-1.amzn2
           Available: 1:libuv-1.23.2-1.amzn2.0.2.i686 (amzn2-core)
               libuv = 1:1.23.2-1.amzn2.0.2
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
5 Answers

Version libuv-1.44.xx is available In amzon linux2 AMI 2022.

For those instances launched before Feb 2022, yum update might be disabled by priorities plugin.

You might see message like 285 packages excluded due to repository priority protections. In this case, you may disable priority plugin and install latest version of libuv. Below commands should help to resolve such case.

yum remove libuv -y    
yum install libuv --disableplugin=priorities

Yeah, plus 1 to this issue. OP, the --skip-broken flag will only temporarily fix your currently running servers though. If you're baking any new AMIs or spinning up any new EC2s with Terraform, CDK, etc, that --skip-broken flag won't work as its not available as part of the aws cloud.init script. This will cause any new AMI or EC2 creations to timeout and fail.

One potential work around is to try compiling libuv directly from source as > 1.39 sadly isn't currently available from any linux distro.

Please install libuv from RPM using below steps :-

yum remove libuv -y
wget https://rpmfind.net/linux/epel/7/x86_64/Packages/l/libuv-1.44.1-1.el7.x86_64.rpm
rpm -i libuv-1.44.1-1.el7.x86_64.rpm

Smooth install of nodejs 16 after that.

I believe the issue is because you are using just multiple yum repos and there is a version mismatch for the latest version of the libuv package (epel-testing and amzn2-core). What worked for me was to temporarily disable the epel repo, or disable temporarily all yum plugins (set plugins=0 on /etc/yum.conf) and perform the yum upgrade.

Related