software installation - How can I install a tar.xz file from nodejs.org? - Ask Ubuntu
this question has answer here:
- how install .tar.gz (or .tar.bz2) file? 10 answers
i'm novice ubuntu.
i downloaded nodejs
nodejs.org website.
the file downloaded node-v7.1.0-linux-x64.tar.xz
i know how extract it, that's it.
please explain how can install it, , should put in filesystem.
if want install , switch between multiple versions of node nvm
(node.js version manager) better option.
check whether have
nvm
or not. if not can pull down nvm installation script project's github page. version number may different, in general, can downloadcurl
:curl -sl https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
run script bash:
bash install_nvm.sh
it install software subdirectory of home directory @
~/.nvm
. add necessary lines~/.profile
file use file.to gain access nvm functionality, you'll need log out , log in again, or can source
~/.profile
file current session knows changes:source ~/.profile
if have multiple node.js versions, can see installed typing:
nvm ls
you can install specific node version typing:
nvm install 6.7.0
if wish default 1 of versions, can type:
nvm alias default 6.7.0
now can reference alias this:
nvm use default
check node version verify whether changes made or not typing:
node -v
Comments
Post a Comment