0
0

More than 1 year has passed since last update.

yum install nodejs | Error: Package: 1:nodejs-16.15.0-3.el7.x86_64 (epel)

Last updated at Posted at 2022-08-14

3ヶ月ぐらいに触れていなかったプロダクトアプリ立ち上げるためにdocker-compoer up -dしましたとさ。
以下のエラーがでましたとさ。

Loaded plugins: ovl, priorities
240 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 1:16.15.0-3.el7 will be installed
--> Processing Dependency: nodejs-libs(x86-64) = 1:16.15.0-3.el7 for package: 1:nodejs-16.15.0-3.el7.x86_64
--> Processing Dependency: libuv >= 1:1.43.0 for package: 1:nodejs-16.15.0-3.el7.x86_64
--> Processing Dependency: openssl11 >= 1:1.1.1 for package: 1:nodejs-16.15.0-3.el7.x86_64
--> Processing Dependency: libbrotlidec.so.1()(64bit) for package: 1:nodejs-16.15.0-3.el7.x86_64
--> Processing Dependency: libbrotlienc.so.1()(64bit) for package: 1:nodejs-16.15.0-3.el7.x86_64
--> Processing Dependency: libnode.so.93()(64bit) for package: 1:nodejs-16.15.0-3.el7.x86_64
--> Processing Dependency: libuv.so.1()(64bit) for package: 1:nodejs-16.15.0-3.el7.x86_64
--> Running transaction check
---> Package brotli.x86_64 0:1.0.7-5.el7 will be installed
---> Package libuv.x86_64 1:1.39.0-1.amzn2 will be installed
---> Package nodejs.x86_64 1:16.15.0-3.el7 will be installed
--> Processing Dependency: libuv >= 1:1.43.0 for package: 1:nodejs-16.15.0-3.el7.x86_64
---> Package nodejs-libs.x86_64 1:16.15.0-3.el7 will be installed
---> Package openssl11.x86_64 1:1.1.1g-12.amzn2.0.9 will be installed
--> Finished Dependency Resolution
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 could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

該当箇所は以下でしたとさ。

# APIドキュメント管理出力ツール
RUN yum install -y sudo \
    && sudo yum install -y nodejs \
    && npm install -g aglio --unsafe-perm

ピンポイントではsudo yum install -y nodejsの部分で失敗してる... と。

まぁググってもなかなか出てこないエラーだったので誰かが似たような検索したときに記事にでもしておけばヒットするだろうと残しておくことにしましたとさ。

Dockerfile内のaglio installする前にリポジトリがnode12に対応するようにしてたんだけどさ

RUN curl -sL https://rpm.nodesource.com/setup_12.x | bash -

現時点のLTS14だから入れ替えたらaglioも無事installできたとさ。

RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash -

npmとnodeってamazonlinuxにどうやっていれるんだっけって調べてたら以下の記事見つけて。

そのままcurl -sL https://rpm.nodesource.com/setup_10.x | bash -実行したらLTSがなにかサジェストしてくれてたので最新のLTSに差し替えればいけるじゃないかということで解決に至りましたとさ。

   * https://rpm.nodesource.com/setup_12.x - Node.js v12 LTS "Erbium"
   * https://rpm.nodesource.com/setup_14.x - Node.js v14 LTS "Fermium" (recommended)
   * https://rpm.nodesource.com/setup_16.x - Node.js v16 "Gallium"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0