-
Navigate to http://nodejs.org/download/ and on the Linux Binaries (.tar.gz) row click to download the 64-bit version of the current latest release.
-
Say you've downloaded
node-v0.10.7-linux-x64.tar.gz
into theDownloads
directory. Then, open the terminal and type the following:
$ cd ~/Downloads
$ mkdir -p ~/local/node
$ tar xzf node-v0.10.7-linux-x64.tar.gz -C ~/local/node --strip-components=1
$ echo '# Node Enviroment Setup' >> ~/.bashrc
$ echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.bashrc
$ echo 'export NODE_PATH=$HOME/local/node/lib/node_modules' >> ~/.bashrc
$ . ~/.bashrc
- No step 3. That's it.
I am using ubuntu 12.04.4 LTS
When i run the install script using the --without-ssl npm throws errors.
I know that npm per default download dependencies via https and that you can change that by issuing:
npm config set registry http://registry.npmjs.org/
but that throws the same error as npm -v does
the error:
$ npm -v
/local/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/index.js:97/local/lib/node_modules/npm/node_modules/request/node_modules/forever-agent/index.js:97:55)ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
^
TypeError: Cannot read property 'prototype' of undefined
at Object. (
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (~/local/lib/node_modules/npm/node_modules/request/request.js:21:20)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Dont know why npm still wants to use AgentSSL.prototype when using the --without-ssl flag
FYI: using the script without using the --without-ssl it works fine