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

亡梦爱人 提交于 2019-12-07 01:02:54

问题


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.


回答1:


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.




回答2:


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 :-)



来源:https://stackoverflow.com/questions/6793499/perl-config-h-needed-by-makefile-not-working-after-osx-lion-upgrade

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!