Last active
December 31, 2015 04:39
-
-
Save inlikealion/7935203 to your computer and use it in GitHub Desktop.
This file contains 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
# this way is best if you want to stay up to date | |
# or submit patches to node or npm | |
mkdir ~/local | |
# I use .bash_profile instead of .bashrc | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bash_profile | |
. ~/.bash_profile | |
# could also fork, and then clone your own fork instead of the official one | |
git clone git://github.com/joyent/node.git | |
cd node | |
# find out the latest release (for now on the 0.10.x track for compatibility with yeoman, grunt, etc) | |
git tag -l | |
git checkout tags/v0.10.xx | |
./configure --prefix=$HOME/local | |
# the -j flag uses all available cores, so make is much faster | |
make install -j | |
cd .. | |
# npm now comes with nodejs, so we should be good to go |
Added the git checkout …
lines to get specific tag
to make
instead of tip.
UPDATE:
Slightly more simple and in line with official reqs (note: remember to checkout a specific release tag prior to the following [not shown in Joyent’s instructions]). According to the official wiki:
$ export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
$ export CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
$ ./configure && make && sudo make install
Followed by:
$ sudo chown -R `whoami` ~/.npm
$ sudo chown -R `whoami` /usr/local/lib/node_modules
SEEMS to be working for me now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following @isaac’s famous install gist, I’ll edit and add comments to this to document what works for me.