Created
April 24, 2015 14:45
-
-
Save bradbergeron-us/c77b81abc94f6db67ebb to your computer and use it in GitHub Desktop.
NPM and Node with no Sudo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # take ownership of the folders that npm/node use | |
| # please don't do this if you don't know what it does! | |
| sudo mkdir -p /usr/local/{share/man,bin,lib/node,include/node} | |
| sudo chown -R $USER /usr/local/{share/man,bin,lib/node,include/node} | |
| # now just a pretty vanilla node install | |
| # let it use the default paths, but don't use sudo, since there's no need | |
| mkdir node-install | |
| curl http://nodejs.org/dist/node-v0.4.3.tar.gz | tar -xzf - -C node-install | |
| cd node-install/* | |
| ./configure | |
| make install | |
| # now the npm easy-install | |
| curl https://www.npmjs.org/install.sh | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment