首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CentOS 6传输检查错误-更新失败

CentOS 6传输检查错误-更新失败
EN

Unix & Linux用户
提问于 2020-06-08 20:45:54
回答 1查看 76关注 0票数 0

我有一个问题,更新我的服务器操作系统。以下是我在运行sudo yum update时遇到的错误列表:

代码语言:javascript
复制
  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-

列表要长得多!

EN

回答 1

Unix & Linux用户

发布于 2020-06-09 09:43:41

从部分列表中可以看出,您已经安装了一个版本的nodejs (8.17.0nodesource在发布字符串中),它与系统存储库提供的版本(在发布字符串中有el6 )发生冲突。现在,当您更新时,有些系统残留物正在尝试更新,或者系统存储库提供了一个更新,以满足更新您已安装的包的版本要求,但由于打包方式或系统包的依赖关系不同,存在冲突。

告诉yum跳过更新npm可能就足够了(因为这至少是您所显示的输出列表中的一个明显冲突,并且可能是导致其他冲突更新的原因)。

代码语言:javascript
复制
sudo yum update --exclude=npm

如果只想保留较新的nodejs版本,则应该查找来自系统存储库的nodejs/npm包的所有跟踪(它们很可能在包发布字符串中包含el6 )和yum remove,因此更新后的版本是唯一剩下的版本。但是,在执行此操作时,您可能会发现其他需要旧版本的包,不应在不考虑对系统的潜在影响的情况下强制执行此操作。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/591688

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档