I updated XCode on my Mac and since then when starting Docker using docker-sync-stack start
I get this error message:
mkmf.rb can\'t find header
Single line command fix:
On OSX Mojave I ran the following command:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
and it fixed the issue.
For Xcode 11 I fixed this by also installing of /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
package.
When upgrading XCode you need to install the Command-Line Tools and additionally accept the terms and conditions:
sudo xcode-select --install
Then:
sudo xcodebuild -license
If you want to get a deeper insight into the issue:
Mac OS X 10.14 has stopped placing the include libraries in their usual location, /usr/include, keeping them only inside the XCode directory.
To confirm that this is the problem, simply run
ls /usr/include
. If the result comes out empty, its really this problem.Apple ships a “legacy installer” for you to be able to install the headers in the “old location”. To fix the problem just run this:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
https://silvae86.github.io/sysadmin/mac/osx/mojave/beta/libxml2/2018/07/05/fixing-missing-headers-for-homebrew-in-mac-osx-mojave/