macos 10.14 软件编译时找不到头文件的解决方法

问题:

今天升级了系统过后 发现phpize报如下错误

$ 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:

解决

  • 在网上找了解决方案,大多数是软链之类的,但是根本没找到 /Application/Xcode.app。然后看到这篇文章 macOS 10.14软件编译时找不到头文件的解决方法
  • 解决方案:重新安装header头文件SDK即可
cd /Library/Developer/CommandLineTools/Packages/
$ open macOS_SDK_headers_for_macOS_10.14.pkg

你可能感兴趣的:(mac)