Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

perl ".../config.h, needed by `Makefile'" not working after OSX Lion upgrade

SOLVED. See at bottom.

Just upgraded to OSX Lion and trying to get my Perl install running again:

sudo /usr/bin/perl -MCPAN -e 'install "MODULENAME"'

with any value of MODULENAME that I tried (e.g. JSON) produces:

...
Checking if your kit is complete...
Looks good
Writing Makefile for JSON
make: *** No rule to make target `/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'.  Stop.
  MAKAMAKA/JSON-2.53.tar.gz
  /Developer/usr/bin/make -- NOT OK

I can't find anything resembling config.h anywhere, the directory exists though ...

Not even this works:

/usr/bin/cpan CPAN

SOLVED: Download and install latest version of XCode from AppStore. Note that just downloading XCode from AppStore does not install it (why, Apple, oh why?) but only dumps an installer into /Applications. Run the installer, which will fix this issue.

like image 258
Johannes Ernst Avatar asked Jul 22 '11 17:07

Johannes Ernst


2 Answers

SOLVED: Download and install latest version of XCode from AppStore. Note that just downloading XCode from AppStore does not install it (why, Apple, oh why?) but only dumps an installer into /Applications. Run the installer, which will fix this issue.

like image 168
Johannes Ernst Avatar answered Nov 14 '22 16:11

Johannes Ernst


I still had this problem after installing Xcode, because Xcode didn't automatically install the "Command Line Tools for Xcode" package. This is available from Xcode | Preferences | Downloads | Components and click 'Install' next to 'Command Line Tools'.

Now that this is a separate package, it's also possible to solve this problem without installing all of Xcode (ie. you can just install this package :-)

like image 29
Nathan Avatar answered Nov 14 '22 17:11

Nathan