今天安装PHP的时候提示这个错误 configure: error: png.h not found.,这个是选择安装GD模块才会出现的错误,详细错误信息如下

If configure fails try --with-vpx-dir=<DIR>
If configure fails try --with-jpeg-dir=<DIR>
configure: error: png.h not found.

我找了下资料说是libpng没有安装,于是我执行命令
$>yum install libpng
但是并没有解决,想了下是不是还有什么devel包没安装吧,试了下面这个命令
$> yum install libpng-devel
终于解决了,呵呵。记录下来,方便大家和自己下次查看。