/usr/bin/phpize 报错:Can't find PHP headers in /usr/include/php

以下时centos7环境报错:

执行/usr/bin/phpize时报以下错误:

Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
解决办法,安装 php-devel

yum install php-devel

然后再执行/usr/bin/phpize就可以了:

/usr/bin/phpize 报错:Can't find PHP headers in /usr/include/php

执行:./configure --with-php-config=/usr/bin/php-config 报以下错误:

checking for the location of zlib... configure: error: zip support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located

解决办法,安装zlib-devel 

Debian环境:apt-get install zlib1g-dev -y

Centos7环境:yum install zlib-devel -y

/usr/bin/phpize 报错:Can't find PHP headers in /usr/include/php