How to use the terminal. You can for example use gnome-terminal
.
sudo apt-get install build-essential libssl-dev curl git-core
Below we will install NVM.
git clone git://github.com/creationix/nvm.git ~/.nvm
echo "\n. ~/.nvm/nvm.sh" >> .bashrc
In this example I am going to install node v0.4.12. We first need open new bash session. You can also do this by typing bash
again.
$ bash
$ nvm install v0.4.12 #This takes a while.
To make the latest v0.4 branch default you do
$ nvm alias default 0.4
When you don't have all dependencies installed you can not compile/install node.js. Then you will need to clean up ~/.nvm
$ rm -rf ~/.nvm/
The top answer is out of date. Now, just follow the guide on the github to install :
https://github.com/creationix/nvm#installation
For linux machines, its as simple as :
curl -o- https://raw.githubusercontent.com/creationix/nvm/v*/install.sh | bash
Replace v*
with the latest version from https://github.com/creationix/nvm/releases .
For example: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
sudo apt-get install build-essential checkinstall
sudo apt-get install libssl-dev
curl -o- https://raw.githubusercontent.com/cre ... | bash
command -v nvm
nvm ls-remote
nvm install 6.14.4
nvm use 6.14.4
nvm alias default node 6.14.4
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.