Tin tức

Ngôi làng có 100 người sống trong hang động, tách biệt với thế giới bên ngoài
Ngôi làng có 100 người sống trong hang động, tách biệt với thế giới bên ngoài
14-08-2016 33,143
Phi hành gia Mỹ xác nhận nghe thấy âm nhạc bí ẩn trên Mặt trăng trên tàu Apollo 10
Phi hành gia Mỹ xác nhận nghe thấy âm nhạc bí ẩn trên Mặt trăng trên tàu Apollo 10
22-02-2016 36,595
Syria thành đấu trường thử nghiệm vũ khí không chiến Nga
Syria thành đấu trường thử nghiệm vũ khí không chiến Nga
02-12-2015 37,204
Trung Quốc săn người ngoài hành tinh bằng kính viễn vọng khổng lồ
Trung Quốc săn người ngoài hành tinh bằng kính viễn vọng khổng lồ
01-12-2015 37,260
Người dựng hầm, uống rượu sống cô độc giữa 'Bắc Cực Trung Quốc'
Người dựng hầm, uống rượu sống cô độc giữa 'Bắc Cực Trung Quốc'
30-11-2015 37,322
Công nghệ 'hồi sinh người chết' sẽ thành hiện thực trong 30 năm
Công nghệ 'hồi sinh người chết' sẽ thành hiện thực trong 30 năm
29-11-2015 37,807

Lỗi nodejs khi sau khi cài đặt thêm npm

26-08-2016 2,184

Nếu các bạn cài đặt nodejs theo hướng dẫn sau:

curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs

Và sau đó cài thêm npm thì báo lỗi tương tự như sau:

Transaction check error:
  file /usr/lib/node_modules/npm/node_modules/semver from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/package.json from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/mkdirp from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/graceful-fs from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/rimraf from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/fstream from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/lru-cache from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/osenv from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/ini from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/slide from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/block-stream from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/tar from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/pack.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/utils/tar.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/chownr from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/abbrev from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/nopt from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/retry from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/which from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/ansi from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/npmlog from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/once from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/sha from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/cmd-shim from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/read from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/init.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/opener from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/editor from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/edit.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/archy from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/minimatch from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/glob from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/read-package-json from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/read-installed from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/init-package-json from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/fstream-npm from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/uid-number from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/npm-user-validate from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/npmconf from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/lockfile from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/child-process-close from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/chmodr from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/request from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/node-gyp from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/build.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/install.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/rebuild.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/node_modules/npm-registry-client from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/adduser.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/publish.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/star.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/stars.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/tag.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/unpublish.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/bin/npm from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/bin/npm-cli.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/bin/read-package-json.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/doc from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/html from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/bugs.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/cache.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/completion.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/config.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/dedupe.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/deprecate.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/docs.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/explore.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/help-search.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/help.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/link.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/ls.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/npm.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/outdated.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/owner.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/prune.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/run-script.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/search.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/shrinkwrap.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/submodule.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/test.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/unbuild.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/uninstall.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/update.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/utils/completion/file-completion.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/utils/completion/installed-deep.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/utils/error-handler.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/utils/fetch.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/utils/gently-rm.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/utils/lifecycle.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/version.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/view.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/whoami.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64
  file /usr/lib/node_modules/npm/lib/xmas.js from install of npm-1.3.6-5.el7.noarch conflicts with file from package nodejs-0.10.38-1nodesource.el7.centos.x86_64

Các bạn có thể chạy lệnh sau:

yum erase /etc/yum.repos.d/nodesource-el.repo

Sau đó cài đặt lại nodejs và npm là được nhé

Chúc các bạn thành công