The tar file I downloaded is a binary (not source) distribution. I read an article that said to run tar --strip-components 1 -xzf in /usr/local but if I do this I cant see an simple way to remove everything when I want to upgrade the version later. I could un-tar it with the prefix intact, i.e. tar -xzf but i'm not sure which environment variables would need to be set to get man pages and everything else working, at minimum I guess I would need to set the path. Is there a 'best practice' for this kind of installation?

  • nvm manages my node installations much better. I do not know your use case, so i cannot comment on that. – Srinivas Reddy Thatiparthy Nov 13 '17 at 12:37

The best way to install node is described on the official website.

The setup script will create a /etc/apt/sources.list.d/nodesource.list to update the installed package version .

You can see the content of the ./setup script:

curl -sL https://deb.nodesource.com/setup_6.x

There are may features :

  • adding a NodeSource signing key
  • automatic update
  • check your system to install the appropriate package to your OS
  • Install the required package (apt-transport-https , lsb-release ..)
  • It is safe than installing a node tar file.
| improve this answer | |
  • This is fine if I want to install version 8.x but if I want to install the latest version I think would need use either a binary or source tar file. – Shane Nov 16 '17 at 4:55

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.