Brew Install Zlib-devel On Mac OS X Mavericks
Answer : Just run in the command line: xcode-select --install In OS X 10.9+, the command line developer tools are now installed on demand. So after running this also zlib and zlib-devel should be available (no need for brew install zlib...) For OS X Mojave sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / The reason is because Xcode Command Line tools no longer installs needed headers in /include. You have to run a separate command to install the needed headers. As noted here - https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes 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