mxcl/homebrew — Issue #8193: Node installation failure on OSX 10.7 with XCode 4.2
Author: thesmith
Created: 2011-10-19 11:45:32+00:00
State: open

Configure fails as it's looking for g++-4.2 and gcc-4.2, which don't exist.

I fixed it with:
sudo ln -s /usr/bin/g++ /usr/bin/g++-4.2
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

But obviously that's not ideal.
Output:
[~] $ brew install -vd node
==> ./configure --prefix=/usr/local/Cellar/node/0.4.8
./configure --prefix=/usr/local/Cellar/node/0.4.8
Checking for program g++ or c++ : /usr/bin/g++-4.2
/private/tmp/homebrew-node-0.4.8-sJYR/node-v0.4.8/wscript:225: error: could not configure a cxx compiler!
Error: #
/usr/local/Library/Homebrew/formula.rb:490:in `system'
/usr/local/Library/Formula/node.rb:30:in `install'
/usr/local/Library/Homebrew/install.rb:92:in `install'
/usr/local/Library/Homebrew/formula.rb:260:in `brew'
/usr/local/Library/Homebrew/formula.rb:558:in `stage'
/usr/local/Library/Homebrew/formula.rb:510:in `mktemp'
/usr/local/Library/Homebrew/formula.rb:556:in `stage'
/usr/local/Library/Homebrew/formula.rb:255:in `brew'
/usr/local/Library/Homebrew/install.rb:70:in `install'
/usr/local/Library/Homebrew/install.rb:34
/usr/local/Library/Formula/node.rb:34
==> Rescuing build...
When you exit this shell Homebrew will attempt to finalise the installation.
If nothing is installed or the shell exits with a non-zero error code,
Homebrew will abort. The installation prefix is:
/usr/local/Cellar/node/0.4.8