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年前2538ビュー
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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ