如何编译php以启用webp支持?

时间:2021-06-09 23:26:43

while I compile php 5.5.10 many times ,but still cannot get webp support enable,which is described by "http://cn2.php.net/manual/zh/function.imagewebp.php". here is my compile setting:

虽然我多次编译php 5.5.10,但仍然无法获得webp支持启用,这由“http://cn2.php.net/manual/zh/function.imagewebp.php”描述。这是我的编译设置:

CentOS release 5.8 (Final) x86_64
freetype-2.4.6
jpeg-8c
libpng-1.2.35
gd-2.1.0

php compile command

php编译命令

./configure    --prefix=/apps/lib/php-5.5.10  --with-mysql=mysqlnd   --with-mysqli=mysqlnd   --with-pdo-mysql=mysqlnd   --enable-mysqlnd   --enable-fpm   --enable-mbstring   --enable-mbregex   --with-zlib-dir=/apps/lib/zlib   --enable-pcntl   --enable-sockets   --enable-ftp   --enable-soap   --enable-bcmath   --disable-debug   --enable-sockets   --enable-inline-optimization   --disable-rpath   --with-mysql=/apps/svr/mysql5   --with-libxml-dir=/apps/lib/libxml   --with-jpeg-dir=/apps/lib/jpeg   --with-iconv-dir=/apps/lib/libiconv   --with-mcrypt=/apps/lib/libmcrypt   --with-freetype-dir=/apps/lib/freetype   --with-gd=/apps/lib/gd-2.1.0  --with-openssl-dir=/apps/lib/openssl   --with-openssl=/apps/lib/openssl   --with-curl=/apps/lib/curl  --with-png-dir=/apps/lib/libpng --enable-opcache=no

and finally get this output for gd

最后得到gd的这个输出

gd

GD Support => enabled
GD Version => 2.1.0-alpha
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.6
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.2.35
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled

while I follow the steps by 'http://techglimpse.com/install-upgrade-php55-yum/' to install php 5.5.9 using remi.repo,I finally get the success signal from this output for gd

当我按照'http://techglimpse.com/install-upgrade-php55-yum/'的步骤使用remi.repo安装php 5.5.9时,我终于从gd的输出中得到了成功信号

gd

GD Support => enabled
GD Version => 2.1.0
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.2.1
T1Lib Support => enabled
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 6b
PNG Support => enabled
libPNG Version => 1.2.10
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled

For system admin's concern , I need to deploy php with the compiling version . Did I miss anything important while compiled php or lib gd ?

对于系统管理员的关注,我需要使用编译版本部署php。在编译php或lib gd时,我是否遗漏了任何重要内容?

1 个解决方案

#1


1  

To enable WebP support, you have to add --with-vpx-dir= to your configure line (and of course have libvpx installed). See also https://bugs.php.net/bug.php?id=64476.

要启用WebP支持,您必须将--with-vpx-dir =添加到您的配置行(当然还安装了libvpx)。另见https://bugs.php.net/bug.php?id=64476。

#1


1  

To enable WebP support, you have to add --with-vpx-dir= to your configure line (and of course have libvpx installed). See also https://bugs.php.net/bug.php?id=64476.

要启用WebP支持,您必须将--with-vpx-dir =添加到您的配置行(当然还安装了libvpx)。另见https://bugs.php.net/bug.php?id=64476。