Skip to content

Instantly share code, notes, and snippets.

@stephanetimmermans
Last active December 16, 2015 20:59
Show Gist options
  • Save stephanetimmermans/5496788 to your computer and use it in GitHub Desktop.
Save stephanetimmermans/5496788 to your computer and use it in GitHub Desktop.

Revisions

  1. stephanetimmermans revised this gist May 1, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -19,3 +19,7 @@ make install

    node -v
    npm -v

    #In case of bash: /usr/local/bin/npm: No such file or directory
    hash -r
    npm -v
  2. stephanetimmermans created this gist May 1, 2013.
    21 changes: 21 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    sudo apt-get install build-essential libssl-dev curl

    # The install script
    # Adapted from https://gist.github.com/579814

    echo '# Added by install script for node.js and npm in 30s' >> ~/.bashrc
    echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
    echo 'export NODE_PATH=$HOME/local/lib/node_modules' >> ~/.bashrc
    . ~/.bashrc

    mkdir -p ~/local
    mkdir -p ~/Downloads/node-latest-install

    cd ~/Downloads/node-latest-install
    curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1

    ./configure --prefix=~/local # if SSL support is not required, use --without-ssl
    make install

    node -v
    npm -v