2

I'm trying to install node.js on a friend's computer. We had an old version (0.4.*), then installed n to update to a more recent version of node using n - node version manager

now instead of having an old version of node, we get

$ node -v
Segmentation fault
$ n --version
1.2.1
$ npm --version
Segmentation fault

When we type n the versions we installed show up but they are all greyed out. What's a Segmentation fault, why is it happening and how can we fix it?

Connor Leech
  • 18,052
  • 30
  • 105
  • 150
  • 1
    There are many possible causes for a [segmentation fault](http://en.wikipedia.org/wiki/Segmentation_fault). My advice: remove all node versions from your system and reinstall it. If I had direct access to the machine I might be able to do something more focused than this, but I don't have access to the machine. – Louis Mar 05 '14 at 11:30
  • okay cool. We'll follow the instructions on how to remove node and npm from the system completely: http://stackoverflow.com/questions/5650169/uninstall-node-js-using-linux-command-line – Connor Leech Mar 05 '14 at 11:51

1 Answers1

1

Unless you're using something with binary dependencies (npm doesn't), segmentation fault means on of two things:

  1. there is a bug in node.js core, and it should be reported
  2. your node.js installation is broken

So you can solve this by reinstalling the most recent node.js version using a standard way from nodejs.org website. If it still segfaults (highly unlikely, but possible in some non-standard environments), report it to node.js core team.