how to install cc on mac os 10.8 without paying for developer program? [closed]

只愿长相守 提交于 2019-12-13 08:55:58

问题


Several python libraries stopped working after upgrade to Mac OS 10.8. Attempt to re-install them through easy_install or pip brings error message "-bash: cc: command not found". XCode is installed. Attempt to install Command line tools for XCode insist on enrolling into developer program. I don't want to pay $99 for what used to work. I don't need to distribute anything — I'm not developing anything Apple has to do with.

Is there a way to obtain c compiler, make, and all this stuff without declaring myself a Mac developer/paying $99 a year?

UPDATE: guys, what these negative votes are about? You know the answer? You don't like to know there are problems with Mac OS X 10.8? I'm really confused.


回答1:


Command Line Tools are available for free:

  • visit https://developer.apple.com/devcenter/mac/index.action
  • log in with your personal Apple ID
  • fill the form
  • after confirmation you will be able to download tools absolutely free (or install them from Xcode).

Also check https://github.com/kennethreitz/osx-gcc-installer/
Probably it's what you are looking for.




回答2:


You should be able to install the command line tools from within Xcode by going to preferences and downloads. If it is still complaining try using xcrun to access the built in tools. xcrun lets you access the built in xcode tools from the command line.

xcrun -find cc to find where llvm is and then you could setup your environment to work around it.

Example:

xcrun -find cc
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
lomion@basso.local:/usr/bin>xcrun cc
clang: error: no input files
Exit 1



回答3:


I'm not completely sure if this will work, but it won't wreck your computer so why not. You can download the Clang toolchain here http://llvm.org/releases/download.html. You'll want the Clang Binaries for MacOS X/x86_64. It should install llvm, gcc, cc and everything for you.



来源:https://stackoverflow.com/questions/11660573/how-to-install-cc-on-mac-os-10-8-without-paying-for-developer-program

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