I put sudo apt-get install nodejs npm , then 'sudo nodejs -v', shows the version, the truth is the old one. But if you write in the node console

ivan @ pc: ~ $ sudo node
sudo: node: command not found
ivan @ pc: ~ $

And gulp doesn't start, it writes the exact same error. What the heck?

  • Try sudo apt-get update && sudo apt-get upgrade - Oceinic 5:52
  • @Oceinic and what version will it give me? Ugly latest stable? - vas
  • This command will upgrade all packages to the latest stable version. By the way, what year have you got the distribution kit? - Oceinic
  • @Oceinic last stable I do not want to put, with her some problems. The distribution of the last, the one that was before 15. That is, 14, xx - vas
  • @Oceinic I downloaded the necessary nodejs archive, unpacked. Can you tell me how to prescribe it in the paths? - vas

1 answer 1

Outdated versions can be stored in the standard archive. Try this:

 curl -sL https://deb.nodesource.com/setup_5.x | sudo bash - 

And then:

 apt-get install nodejs