如何安装gd库

WBOY
Release: 2016-06-13 13:12:47
Original
1370 people have browsed it

怎么安装gd库
我的linux下原来有安装php 5.3但是好像没有gd库,wordpress中的一个theme有用到imagecreatefromjpeg(),有报错:
Fatal error: Call to undefined function imagecreatefromjpeg() in /home/highbeam/public_html/247carleasing.sg/wp-content/themes/car-rental/system/libraries/image.php on line 33

所以我就安装了:
zlib-1.2.3.tar.gz到/usr/local/zlib下面
libtool-2.4.2.tar.gz到默认目录
jpeg-6b.tar.gz到/usr/local/jpeg6下面
libpng-1.2.16.tar.gz到/usr/local/libpng下面
freetype-2.3.4.tar.gz到/usr/local/freetype下面
gd-2.0.33.tar.gz到/usr/local/gd2下面。

原先php是安装好的,我怎么让php支持gd呢



------解决方案--------------------
1 phpinfo,输出你原来的configure串
2 找到你的php源码,configure的时候加上 --with-gd=/usr/local/gd 后面这个地址是你安装gd的实际地址
3 make
然后不用教了吧
------解决方案--------------------

探讨
引用:

1 phpinfo,输出你原来的configure串
2 找到你的php源码,configure的时候加上 --with-gd=/usr/local/gd 后面这个地址是你安装gd的实际地址
3 make
然后不用教了吧

谢谢,有没有不用重新编译的方法?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template