Issues installing Jekyll on macOS Mojave

Reason for Jekyll install issues

Starting with Mojave, the macOS SDK headers are no longer installed under /usr/include/ by default. You can confirm this by reading the heading Command Line Tools / New Features in the Xcode 10 Release Notes.

The Command Line Tools package installs the macOS system headers inside the macOS SDK. Software that compiles with the installed tools will search for headers within the macOS SDK provided by either Xcode at:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
or the Command Line Tools at:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
depending on which is selected using xcode-select.
The command line tools will search the SDK for system headers by default. However, some software may fail to build correctly against the SDK and require macOS headers to be installed in the base system under /usr/include. If you are the maintainer of such software, we encourage you to update your project to work with the SDK or file a bug report for issues that are preventing you from doing so. As a workaround, an extra package is provided which will install the headers to the base system. In a future release, this package will no longer be provided. You can find this package at:
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
To make sure that you’re using the intended version of the command line tools, run xcode-select -s or xcode select -s /Library/Developer/CommandLineTools after installing.

Solution

As some users already mentioned, after installing the Xcode Command Line Tools you may also need to install the macOS SDK headers with the following command in your terminal.

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

These SDK headers are already included with an Xcode install tho. This seems to be the main reason why some users had issues while others did not.

Hey @Frank Is it possible for me to edit my original post?

I can. I’ve updated your post.

1 Like