Space Cat, Prince Among Thieves

Fix Missing Headers Compiling on macOS Mojave

While trying to compile PHP extensions after installing macOS Mojave, I was butting up against a ton of missing header file errors including php.h and zlib.

After several hours of beating my head against my desk and Googling/Stack Overflowing I found the solution.

Ends up you just need to force re-install the header files. Special thanks to @sfdye for the solution!

$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

If you get an error about that file not existing, you probably simply don't have the Xcode command line tools installed which can be remedied simply as follows:

$ xcode-select --install

Read More / Comment »

Recent Comments

Shortest and best example how to generate the certificate so that it is accepted by the chrome.

Thanks so much dude, It worked indeed. Gonna share this on my blog.

Hey there. You just helped me find the holy grail for generating CSV in Swift: I ended up prefixing my CSV-string with "\u{FEFF}". And export it with UTF16L…

Thanks! You saved me a lot of time and hassle. Appreciate it very much.

Good work! Only problem is that there's no option to decode URLs, sometimes it's needed. E.g. I copied these old and new URLs from browser address bar and paste…