Install Node.js v0.8.17 on Webfaction

First follow the instructions for “Installing the latest version of tar” and “Save the new PATH” here : http://dstvns.com/setting-up-nodejs-on-webfaction-revised/

When I followed those instructions, installing tar went fine, but installing Node failed.  Here’s how I made it work:

Install Node.js v0.8.17

  1. cd $HOME/src
  2. wget http://nodejs.org/dist/v0.8.17/node-v0.8.17.tar.gz
  3. tar -xvf node-v0.8.17.tar.gz
  4. cd node-v0.8.17
  5. Using your favorite editor, open the files configure and tools/install.py from the node-v0.8.17 directory. Change the first line #!/usr/bin/env python to #!/usr/bin/env python2.7
  6. alias python=python2.7 (Note: you can check your current version of python with python -V)
  7. ./configure --prefix=$HOME
  8. make
  9. python tools/install.py install

Win!

(Credit for step 9 goes to: http://orion98mc.blogspot.com/2012/08/two-hours-ill-never-get-back.html)

Uninstall Node.js

  1. rm -r ~/lib/node
  2. rm -r ~/bin/node
This entry was posted in Node.js, Solutions, Webfaction. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • http://www.kalenyuk.com.ua Sergey

    It works great on Ubuntu 12.04. Thanks!