Linux 2 yum install nodejs fails dependency resolution for libuv >= 1:1.42.0

0

When I run sudo yum install nodejs the installation fails with:

--> Running transaction check
---> Package nodejs.x86_64 1:16.13.2-3.el7 will be installed

...

--> Finished Dependency Resolution
Error: Package: 1:nodejs-16.13.2-3.el7.x86_64 (epel)
           Requires: libuv >= 1:1.42.0
           Available: 1:libuv-1.23.2-1.amzn2.0.2.i686 (amzn2-core)
               libuv = 1:1.23.2-1.amzn2.0.2
           Available: 1:libuv-1.39.0-1.amzn2.i686 (amzn2-core)
               libuv = 1:1.39.0-1.amzn2

What should I do?

Nigel
asked 2 years ago2484 views
1 Answer
0

I saw this question precisely because I hit the same issue with a new Amazon Linux 2 server.

Two options; either wait for the official release of the AWS Linux 2022 AMI build (which has the correct version of libuv baked in). It's still in Preview at the moment, however. https://aws.amazon.com/linux/amazon-linux-2022/?amazon-linux-whats-new.sort-by=item.additionalFields.postDateTime&amazon-linux-whats-new.sort-order=desc

A more instant gratification can be gained by installing libuv manually. These instructions were gained from the README file inside the tar.gz. Note that this is specific to version 1.43, but if you require a different version, visiting https://dist.libuv.org/dist/ will show all possible versions.

wget https://dist.libuv.org/dist/v1.43.0/libuv-v1.43.0.tar.gz
tar -zxf libuv-v1.43.0.tar.gz
cd libuv-v1.43.0/
./autogen.sh
./configure
make
make install

and then try your yum install of nodejs again;

yum install -y nodejs
answered 2 years ago
  • Thanks for this great answer. I've tried the manual installation, but not quite got there. I followed the recipe you suggested. I had to make two additions: First, install libtool, used by autogen

    sudo yum install libtool

    Second, replace the configure command to put the library in the right place for AWS Linux2

    ./configure --prefix=/usr --libdir=/usr/lib64

    But there is clearly something else I need to do, as sudo yum install nodejs still complains about the missing library (same error as before).

  • I am also getting the about the missing library (same error as before) Error: Package: 1:nodejs-16.15.0-3.el7.x86_64 (epel) Requires: libuv >= 1:1.43.0 Available: 1:libuv-1.23.2-1.amzn2.0.2.i686 (amzn2-core) libuv = 1:1.23.2-1.amzn2.0.2 Available: 1:libuv-1.39.0-1.amzn2.i686 (amzn2-core) libuv = 1:1.39.0-1.amzn2

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions