在Centos 6上安装php-gd时依赖性失败

时间:2016-09-22 09:41:38

标签: php linux centos

我正在尝试在我的centos 6机器上安装php-gd,但我收到了这个错误...有人能指出我正确的方向吗?谢谢

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.nayatel.com
 * epel: mirrors.nayatel.com
 * extras: mirrors.nayatel.com
 * remi: remi.schlundtech.de
 * remi-php56: remi.schlundtech.de
 * remi-safe: remi.schlundtech.de
 * rpmforge: ftp.heanet.ie
 * updates: mirrors.nayatel.com
 * webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.6.26-1.el6.remi will be installed
--> Processing Dependency: gd-last(x86-64) >= 2.1.1 for package: php-gd-5.6.26-1.el6.remi.x86_64
--> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-5.6.26-1.el6.remi.x86_64
--> Running transaction check
---> Package gd-last.x86_64 0:2.2.3-1.el6.remi will be installed
--> Processing Dependency: libwebp.so.5()(64bit) for package: gd-last-2.2.3-1.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: gd-last-2.2.3-1.el6.remi.x86_64 (remi)
           Requires: libwebp.so.5()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

2 个答案:

答案 0 :(得分:5)

我有同样的问题更新到PHP 5.6,但发现libwebp可以从EPEL Centos 6 repo安装:

yum install epel-release

可能要检查

默认情况下是否已禁用此功能
/etc/yum.repos.d/epel.repo

然后

yum --enablerepo remi,epel install gd-last

安装了gd-last包..

然后我回到原来的命令(更新到php 5.6)

yum --enablerepo remi,remi-php56 update php*

答案 1 :(得分:0)

# rpm -qf /usr/lib64/libwebp.so.5
libwebp-0.4.3-3.el6.x86_64

# yum info libwebp
Installed Packages
Name        : libwebp
Arch        : x86_64
Version     : 0.4.3
Release     : 3.el6
Size        : 659 k
Repo        : installed
From repo   : epel
Summary     : Library and tools for the WebP graphics format
URL         : http://webmproject.org/
License     : BSD
Description : WebP is an image format that does lossy compression of digital
            : photographic images. WebP consists of a codec based on VP8, and a
            : container based on RIFF. Webmasters, web developers and browser
            : developers can use WebP to compress, archive and distribute digital
            : images more efficiently.

所以应该工作。 请检查 remi-release epel-release 是否与您正在运行的centOS版本匹配,并且您没有任何其他版本的 libwebp 已安装。