Docker for Mac - mkmf.rb can't find header files for ruby

前端 未结 10 1793
一生所求
一生所求 2020-12-07 08:41

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         


        
相关标签:
10条回答
  • 2020-12-07 09:08

    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.

    0 讨论(0)
  • 2020-12-07 09:09

    For Xcode 11 I fixed this by also installing of /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package.

    0 讨论(0)
  • 2020-12-07 09:13

    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
    
    0 讨论(0)
  • 2020-12-07 09:15

    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/

    0 讨论(0)
提交回复
热议问题