i am getting errors while updating nodejs on centos
file /usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-y et/package.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesour ce.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/README.m d conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos. x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/package. json conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.cent os.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/progress -bar.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.c entos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/npmlog/package.json conflicts betw een attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodej s-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/README.md conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.e l7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/common.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.e l7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/glob.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7 .centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/minimatch/LICENSE conflicts between attempted installs of nodejs- 1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos. x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/minimatch/README.md conflicts between attempted installs of nodej s-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.cento s.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/minimatch/minimatch.js conflicts between attempted installs of no dejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.ce ntos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-matc h/package.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesourc e.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/pa ckage.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el 7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/minimatch/node_modules/brace-expansion/package.json conflicts bet ween attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 and node js-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/minimatch/package.json conflicts between attempted installs of no dejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.ce ntos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/node_modules/path-is-absolute/package.json conflicts between attempted install s of nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource .el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/package.json conflicts between attempted installs of nodejs-1:6.3.1-1nodesourc e.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/read-package-json/node_modules/glo b/sync.js conflicts between attempted installs of nodejs-1:6.3.1-1nodesource.el7 .centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/retry/Makefile conflicts between a ttempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs-1:6 .3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/retry/lib/retry.js conflicts betwe en attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs -1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js confl icts between attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 file /usr/lib/node_modules/npm/node_modules/retry/package.json conflicts betwe en attempted installs of nodejs-1:6.3.1-1nodesource.el7.centos.x86_64 and nodejs -1:6.3.1-1nodesource.el7.centos.x86_64
Error Summary
any idea? how can i upgrade to new nodejs
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
It looks like you have packages that are conflicting with new version of nodejs.
Try running the command below to remove all nodejs packages:
yum remove node*
And then install nodejs again.
sudo yum install nodejs npm
Try the following commands - The module n makes version-management easy: Linux/Mac
sudo npm install n -g
sudo n 0.12.2
For the latest stable version:
sudo n stable
Windows:
just reinstall node from the .msi in Windows from the node website.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.