Shell Person Help me keep the shell people alive.

5Oct/1210

Easy Install Error “unable to execute clang” on Mountain Lion

Recently I've been getting the error

error: Setup script exited with error: command 'clang' failed with exit status 1

when trying to install various Python libraries using Easy Install on OSX Mountain Lion (with Server.app installed). This happened recently trying to install psycopg2, but I've seen it before when trying to install lxml.

server:Desktop shellperson$ sudo easy_install psycopg2
Password:
Searching for psycopg2
Reading http://pypi.python.org/simple/psycopg2/
Reading http://initd.org/psycopg/
Reading http://initd.org/projects/psycopg2
Best match: psycopg2 2.4.5
Downloading http://initd.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.5.tar.gz
Processing psycopg2-2.4.5.tar.gz
Running psycopg2-2.4.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-TUzBu0/psycopg2-2.4.5/egg-dist-tmp-wjxjYJ
no previously-included directories found matching 'doc/src/_build'
unable to execute clang: No such file or directory
error: Setup script exited with error: command 'clang' failed with exit status 1

Fixed the problem by first installing Xcode from the App Store, then installing Command Line Tools from the Downloads section of Xcode's Preferences screen.

UPDATE: Now on Mavericks you can install Command Line Tools using the following command:

xcode-select --install

Credits:
http://stackoverflow.com/a/9403589

30Sep/120

New Location for org.postgresql.postgres.plist in Server.app 2.1.1

In Server.app 2.1.1 for OSX Mountain Lion, the PostgreSQL configuration file has been moved from

/System/Library/LaunchDaemons/org.postgresql.postgres.plist

to its new location at

/Library/Server/PostgreSQL/Config/org.postgresql.postgres.plist

You no longer need administrative privileges to edit it.