1. 程式人生 > >grep: /usr/include/php/main/php.h: No such file or directory

grep: /usr/include/php/main/php.h: No such file or directory

tool bsp direct rec pac phpize con 可能 解決

異常

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:

場景

mac下,執行 phpize 安裝PHP擴展時報錯

解決

依次執行下面兩條命令, 安裝header包

cd /Library/Developer/CommandLineTools/Packages/
// 不同的mac系統, 可能名字不一樣
open macOS_SDK_headers_for_macOS_10.14.pkg

grep: /usr/include/php/main/php.h: No such file or directory