1

I currently broke my node setup by attempting to upgrade it following a tutorial. I added a symlink and I was told to just reinstall node on here since the symlink can't be undone.

I went ahead and did that by following yet another tutorial.
Ran this:

yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -
yum install nodejs

I got a bunch of these with the ending Error Summary:

  file /usr/lib/node_modules/npm/node_modules/uid-number from install of nodejs-2:6.17.1-1nodesource.x86_64 conflicts with file from package npm-1.3.6-5.el6.noarch
  file /usr/lib/node_modules/npm/node_modules/which from install of nodejs-2:6.17.1-1nodesource.x86_64 conflicts with file from package npm-1.3.6-5.el6.noarch

Error Summary
-------------

I then ran node -v The error I get is:

bash: /usr/bin/node: No such file or directory

I checked and this is there but "node" appears black with the type pink like so: enter image description here

Any idea how I can get node back up?

  • Please would you add links to these "tutorials" you mention. – roaima Jun 11 at 22:15
2

Those "tutorials" are a calamity.

I'm not administering centos machines, but on my centos 7 vm test machine (yours looks like centos 6), this is how I installed nodejs:

yum install epel-release
yum install nodejs

A (completely untested) method to fix the damage would be to remove the nodejs package, remove the nodesource repository, and then install nodejs from epel:

yum remove nodejs
rm /etc/yum.repos.d/nodesource*
yum install epel-release
yum install nodejs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.