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
질문됨 2년 전2613회 조회
1개 답변
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
답변함 2년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠