configure: error: Cannot find PHP-config. Please use --with-php-config=PATH
一般出現這個錯誤說明你執行 ./
configure
時 --with-php-config
這個參數配置路徑錯誤導致的。
修改為:
./configure --with-php-config=/usr/local/php/bin/php-config
就可以解決問題
上面的 /usr/local/php/ 是你的 php 安裝路徑 ,路徑完整填寫是 php-config的路徑
查看安裝路徑的命令:
whereis php
which php :這個是查看正在運行的