CentOS 6 トランザクション確認エラー - 更新失敗

CentOS 6 トランザクション確認エラー - 更新失敗

サーバーオペレーティングシステムの更新に問題があります。実行時に発生するエラーのリストは次のとおりですsudo yum update

  file /usr/lib/node_modules/npm/node_modules/which/package.json from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-which-1.0.5-8.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/which/bin/which from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-which-1.0.5-8.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/which/which.js from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-which-1.0.5-8.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/uid-number/package.json from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-uid-number-0.0.3-7.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-uid-number-0.0.3-7.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/uid-number/uid-number.js from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-uid-number-0.0.3-7.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/osenv/package.json from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-osenv-0.0.3-5.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/osenv/osenv.js from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package nodejs-osenv-0.0.3-5.el6.noarch
  file /usr/lib/node_modules/npm/bin/npm from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package npm-1.3.6-5.el6.noarch
  file /usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp from install of nodejs-2:8.17.0-1nodesource.x86_64 conflicts with file from package npm-1.3.6-5.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/node-gyp from install of nodejs-

リストが長くなります!

ベストアンサー1

一部のリストからわかるように、インストールしたバージョンnodejs(リリース文字列)がシステムリポジトリが8.17.0提供するバージョン(リリース文字列)とnodesource競合します。el6これで、更新時にシステムの残りの部分が更新を試みるか、システムリポジトリがインストールされているパッケージを更新するためのバージョン要件を満たすアップデートが提供されますが、パッケージや他のバージョンによって競合が発生します。システムパッケージの依存関係。

それ可能yum更新をスキップするように指示するのに十分ですnpm(これは、表示される出力リストに少なくとも1つの明らかな競合があり、おそらく他の競合する更新を導入する責任があるためです)

sudo yum update --exclude=npm

最新バージョンのみを維持するには、nodejsシステムリポジトリでnodejs/パッケージ内のすべてのトレースを見つけて(パッケージリリース文字列にある可能性npmがあります)、最新バージョンを維持するために使用する必要があります。el6yum removeただ残りのバージョン。ただし、これを実行すると、以前のバージョンが必要な他のパッケージが見つかる可能性があるため、システムへの潜在的な影響を考慮せずにそれを強制しないでください。

おすすめ記事