【问题标题】:configure: error: png.h not found while compiling php-5.2.8 on SLES-12-64bit LINUX配置:错误:在 SLES-12-64bit LINUX 上编译 php-5.2.8 时未找到 png.h
【发布时间】:2016-03-17 13:06:16
【问题描述】:

我正在 SLES-12-64bit 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-devel-1.6.8-2.2.x86_64

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

-rw-r--r-- 1 root root 149224 Sep 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

非常感谢任何解决此问题的帮助。

谢谢。

【问题讨论】:

  • 您在这里尝试编译的软件——PHP 5.2.8 和 Apache 1.3.41——都是古老的。 PHP 5.2.8 于 2008 年 12 月发布,Apache 1.3.41 于 2008 年 1 月发布。请告诉我,您构建此软件纯粹是出于历史目的?

标签: php linux apache libpng sles


【解决方案1】:

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

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

或者:# zypper in libpng14-devel


【讨论】:

    【解决方案2】:

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

    sudo apt-get install build-essential

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

    apt-cache search png | grep -i header

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

    【讨论】:

    • 应该是build-essential 而不是build-essentials
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-30
    • 1970-01-01
    • 2016-05-13
    • 1970-01-01
    • 2016-03-02
    相关资源
    最近更新 更多