13

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
Alexandre Martini
  • 389
  • 1
  • 4
  • 14

5 Answers5

15

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
Nafsin Vk
  • 519
  • 4
  • 9
6

Please install libuv from RPM using the below steps:-

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

Smooth install of nodejs 16 after that.

Ramratan Gupta
  • 1,056
  • 3
  • 17
  • 39
asrhayader
  • 61
  • 1
  • 2
  • 1
    Link was broken. Updated link is https://rpmfind.net/linux/epel/7/x86_64/Packages/l/libuv-1.44.2-1.el7.x86_64.rpm – Nisar Ahmed Dec 14 '22 at 09:22
3

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.

  • Thank you for the answer! My question then becomes, will yum still try to update the skipped packages on future update commands? – Alexandre Martini Feb 09 '22 at 20:01
  • 2
    Yes, you would have to add the `--skip-broken` on each `yum update` command. Here's another potential solution. Don't fool around with the libuv package, and instead install nodejs manually like this doc. https://tecadmin.net/install-latest-nodejs-amazon-linux/ – Scarsrcool10 Feb 09 '22 at 21:28
2

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.

cozy
  • 36
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 02 '22 at 07:06
1

The workaround I used for this was to update to a newer version of the base Amazon Linux AMI. The one released on 3/15/2022 has a libuv version of 1.42.0-2 per this doc:

https://docs.aws.amazon.com/linux/al2022/release-notes/all-packages-al2022-20220308.html

Ryan Lutz
  • 355
  • 2
  • 8