简体   繁体   English

为php7安装GD模块,配置php时出错

[英]Installing GD module for php7,Errors when configure php

Installed zlib-1.2.7、libpng-1.5.9、freetype-2.6.4、jpeg-9 and libgd-2.1.0 in ubuntu successfully . 在ubuntu中成功安装了zlib-1.2.7,libpng-1.5.9,freetype-2.6.4,jpeg-9和libgd-2.1.0。

but when I configure for php7: 但是当我为php7配置时:

./configure --prefix=/alidata/server/php7 --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mbstring --enable-pdo --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd  --with-openssl=/alidata/ssl --with-curl --with-zlib --with-zlib-dir=/usr/local --with-webp-dir --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/jpeg9 --with-freetype-dir=/usr/local/freetype --with-gd --enable-gd-native-ttf

I got : configure: error: Problem with libpng.(a|so) or libz.(a|so). 我得到了:配置:错误:libpng。(a | so)或libz。(a | so)有问题。

in config.log: 在config.log中:

configure:33286: checking for png_write_image in -lpng
configure:33311: cc -o conftest -g -O2 -fvisibility=hidden  -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib  -Wl,-rpath,/alidata/ssl/lib -L/alidata/ssl/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/local/jpeg9/lib -L/usr/local/jpeg9/lib -lz conftest.c -lpng  -ljpeg -lwebp -lcurl -lz -lcrypto -lssl -lcrypto -lrt -lm -ldl -lnsl  -lxml2 -lcurl -lxml2 >&5
/usr/local/lib/libpng.so: undefined reference to `inflate'
/usr/local/lib/libpng.so: undefined reference to `crc32'
/usr/local/lib/libpng.so: undefined reference to `deflateReset'
/usr/local/lib/libpng.so: undefined reference to `deflate'
/usr/local/lib/libpng.so: undefined reference to `deflateInit2_'
/usr/local/lib/libpng.so: undefined reference to `inflateEnd'
/usr/local/lib/libpng.so: undefined reference to `deflateEnd'
/usr/local/lib/libpng.so: undefined reference to `trunc'
/usr/local/lib/libpng.so: undefined reference to `inflateInit_'
/usr/local/lib/libpng.so: undefined reference to `pow'
/usr/local/lib/libpng.so: undefined reference to `inflateReset'
/usr/local/lib/libpng.so: undefined reference to `floor'
collect2: error: ld returned 1 exit status
configure:33311: $? = 1
configure: failed program was:
| /* confdefs.h */

Who can help me,thanks!!! 谁能帮助我,谢谢!

此选项可帮助我使用GD:

--with-gd=/usr/ --with-xpm-dir=/usr/ '--with-libdir=lib/x86_64-linux-gnu'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM