Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mountainlion apr compile lacking 'cc'

Trying to build mod_auth_openid on MountainLion with XCode Version 4.4.1 (4F1003), I get a complaint about a missing 'cc' command, as follows:

/usr/share/apr-1/build-1/libtool --silent --mode=link /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc -o mod_auth_openid.la  -rpath /usr/libexec/apache2 -module -avoid-version    libmodauthopenid.la -I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/local/include -L/usr/local/lib -lopkele -lcurl -lexpat -ltidy -lssl -lcrypto -lz -L/usr/lib -lpcre -lcurl
/usr/share/apr-1/build-1/libtool: line 4574: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc: No such file or directory
apxs:Error: Command failed with rc=8323072

What to do?

like image 461
bmargulies Avatar asked Sep 02 '12 22:09

bmargulies


1 Answers

I faced a similar problem while trying to install mod_wsgi using homebrew on Mac (Mountain Lion). Though bmargulies posted the answer in his comment by pointing to github link. But still posting the solution here for completeness.

Run the following command.

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain

And then re-run the install command

like image 122
Pankaj Avatar answered Nov 05 '22 02:11

Pankaj