Skip to content

Instantly share code, notes, and snippets.

@chrisyip
Last active February 12, 2018 20:29
Show Gist options
  • Save chrisyip/5b3cdb6a916f55354201 to your computer and use it in GitHub Desktop.
Save chrisyip/5b3cdb6a916f55354201 to your computer and use it in GitHub Desktop.
Fix Yosemite issues

If you encounter errors like this configure: error: C compiler cannot create executables, try this command on Terminal:

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

You should change XcodeDefault.xctoolchain and OSX10.10.xctoolchain tu suit your case.

If you encounter errors like this fatal error: 'stdlib.h' file not found on Yosemite and Xcode 6.0.1, your /usr/include/ is probably missing.

Try this command on Terminal:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include /usr/include

Notice the MacOSX10.9.sdk, you may want MacOSX10.10.sdk for 10.10 final.

@qguv
Copy link

qguv commented Oct 9, 2015

If you encounter errors like this fatal error: 'stdlib.h' file not found on Yosemite and Xcode 6.0.1, your /usr/include/ is probably missing.

First result on Google for this problem, and the solution worked well for me.

This isn't Yosemite-specific; use tab-completion to find the latest version of /usr/include. Here's an ugly overkill oneliner:

sudo ln -s "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$(ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs | sort | head -n1)/usr/include" /usr/include

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment