Skip to content

Instantly share code, notes, and snippets.

@sumachaa
Last active July 16, 2020 11:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sumachaa/994d893ab237d74519d50f90f227dfbc to your computer and use it in GitHub Desktop.
Save sumachaa/994d893ab237d74519d50f90f227dfbc to your computer and use it in GitHub Desktop.
phpize macOS Mojave 10.14
$ phpize 
grep: /usr/include/php/main/php.h: No such file or directory 
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory 
grep: /usr/include/php /Zend/zend_extensions.h: No such file or directory 
Configuring for : 
PHP Api Version:         
Zend Module Api No:      
Zend Extension Api No:

When checking /usr/include folder does not exist, presumably Xcode command line tools not installed completely

$ xcode-select --install 
xcode-select: note: install requested for  command line developer tools

Still /usr/include folder is missing

$ csrutil status 
System Integrity Protection status: disabled.

Xcode command line tools Try installing it again :

$ xcode-select --install 
xcode-select: error: command line tools are already installed...

Now the solution is

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

After the installation is complete, check /usr/include folder and all the files inside are back.

Now phpize should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment