configure:error:在SLES-12-64bit LINUX上编译php-5.2.8时找不到png.h


configure: error: png.h not found while compiling php-5.2.8 on SLES-12-64bit LINUX

我正在SLES-12-64位LINUX上编译php-5.2.8。运行配置脚本后,我得到以下错误。

配置:错误:找不到png.h

我还安装了libpng16-devel,请参阅下面的命令输出,

#rpm-qa|grep-i libpng

libpng16-16-32bit-1.6.8-2.24.x86_64

libpng16-16-1.6.8-2.24.x86_64

libpng16-devel-32bit-1.6.8-2.2.x86_64

libpng16-devel1.6.8-2.2.x86_64

#ls-l/usr/include/libpng16/png.h

-rw-r--r--1根目录149224 9月11日13:40/usr/include/libpng16/png.h

以下是我提供的配置脚本的选项,./配置

    --prefix=/opt/MicroWorld/usr '
    --exec-prefix=/opt/MicroWorld/usr '
    --sysconfdir=/opt/MicroWorld/etc/httpd/php5 '
    --sharedstatedir=/opt/MicroWorld/usr/php5 '
    --libdir=/opt/MicroWorld/usr/lib/mwhttpd/php5 '
    --includedir=/opt/MicroWorld/usr/include/php5 '
    --with-apache=../apache_1.3.41 '
    --with-config-file-path=/opt/MicroWorld/etc/httpd/php5 '
    --enable-magic-quotes '
    --without-pear '
    --enable-memory-limit '
    --disable-rpath '
    --enable-sockets '
    --with-ldap '
    --enable-mbstring '
    --enable-fpm '
    --enable-shared '
    --disable-debug '
    --with-gd '
    --disable-static '
    --disable-dmalloc '
    --with-tsrm-pthreads '
    --enable-cli '
    --disable-cgi '
    --enable-inline-optimization '
    --enable-ftp '
    --enable-magic-quotes '
    --enable-calendar '
    --enable-bcmath '
    --enable-exif '
    --with-mod_charset '
    --enable-safe-mode '
    --enable-sigchild '
    --enable-dbx '
    --enable-dbase '
    --enable-gd-native-ttf '
    --disable-libxml '
    --disable-simplexml '
    --disable-xml '
    --disable-xmlreader '
    --disable-xmlwriter '
    --disable-dom '
    --enable-pthreads=static '
    --enable-pcntl '
    --enable-maintainer-zts '
    --with-gettext=/usr/local '
    --with-zlib '
    --with-libdir=lib64 '
    --with-png-dir=/usr/include/libpng16 '
    --with-jpeg-dir

我们非常感谢为解决这个问题所提供的任何帮助。

谢谢。


Suse"12":搜索libpng→ →# zypper se libpng

安装devel包:# zypper in libpng12-compat-devel

或:# zypper in libpng14-devel


如果您正在运行Debian变体,请尝试以下操作:

sudo apt-get install build-essential

然后,您应该安装配置脚本抱怨它没有的库的"…-headers"部分(即:png.h)。使用CLI:查找

apt-cache search png | grep -i header

如果您使用的是Redhat,我想通过谷歌搜索可以获得等效的命令行:)