Total Pageviews

Wednesday, 1 January 2014

安装nodejs到virtualenv中

# workon myenv
# cd virtualenv
#
## prefix is required both for compilation and for npm:
# export PREFIX=$(pwd)
# export NODEVER=0.10.18
#
# wget http://nodejs.org/dist/v${NODEVER}/node-v${NODEVER}.tar.gz
# tar -zxf node-v${NODEVER}.tar.gz
# cd node-v${NODEVER}
# ./configure --prefix=$PREFIX
# make && make install
#
# cd ..
# rm -rf node-v${NODEVER}
# rm node-v${NODEVER}.tar.gz
#
## next, install necessary packages with npm -g:
# npm install -g coffee-script
#
## to refresh shell command cache use hash -r
 
from https://gist.github.com/max-arnold/6623465