Trato de preparar Xdebug en mi Mac para usarlo en el desarrollo de PHP, ingresé el resultado de phpinfo() en el asistente oficial y seguí las instrucciones. phpize funcionó, ejecutar ./configure también funciona, pero estoy atascado en el comando make que genera:
Makefile:230: warning: overriding commands for target `test' Makefile:134: warning: ignoring old commands for target `test' /bin/sh ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/libtool --mode=compile cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -o xdebug.lo mkdir .libs cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -fno-common -DPIC -o .libs/xdebug.o ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c:25:10: fatal error: 'php.h' file not found #include "php.h" ^~~~~~~ 1 error generated. make: *** [xdebug.lo] Error 1 Traté de instalar el paquete php-dev a través de brew , pero no existe. ¿Cómo arreglar este problema?
Es porque OSX no instala los encabezados de PHP que requieren las extensiones cuando se compilan. Creo que estás usando el PHP proporcionado por OSX.
En su lugar, debe usar homebrew para instalar PHP, que también instalaría los encabezados, y luego puede instalar Xdebug (y otras extensiones).
Hay excelentes instrucciones en esta respuesta .