问题:
今天升级了系统过后 发现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软件编译时找不到头文件的解决方法
解决方案:
10.14 重新安装header头文件SDK即可
cd /Library/Developer/CommandLineTools/Packages/
$
open macOS_SDK_headers_for_macOS_10.14.pkg
10.15
xcode-select --install
sudo mount -uw /
sudo ln -s
"$(xcrun --show-sdk-path)/usr/include" /usr/include
export SDKROOT
="$(xcrun --show-sdk-path)"
echo "export SDKROOT=\"\$(xcrun --show-sdk-path)\"" >> ~/.bash_profile
sudo DevToolsSecurity -enable