首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装php7的GD模块,配置php时出错

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

Stack Overflow用户
提问于 2016-09-27 12:55:20
回答 1查看 917关注 0票数 0

在ubuntu中成功安装了zlib-1.2.7、libpng-1.5.9、freetype-2.6.4、jpeg-9和libgd-2.1.0。

但是当我为php7进行配置时:

代码语言:javascript
复制
./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

我得到:配置:错误: libpng.(a|so)或libz.(a|so)有问题。

在config.log中:

代码语言:javascript
复制
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 */

谁能帮我,谢谢!

EN

回答 1

Stack Overflow用户

发布于 2017-09-19 23:31:54

此选项对我的GD有帮助:

代码语言:javascript
复制
--with-gd=/usr/ --with-xpm-dir=/usr/ '--with-libdir=lib/x86_64-linux-gnu'
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39716233

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档