为php 5.6安装GD Library

时间:2016-07-04 16:59:48

标签: php gd

我正在使用CentOS机器(版本6.7)..我在这台机器上安装了php 5.6(以前是5.3),实际上我想用这个命令行安装PHP的GD库:

sudo yum install php56u-gd

它给了我这个错误消息

Loaded plugins: fastestmirror, replace, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.mirror.gtcomm.net
 * elrepo: ftp.osuosl.org
 * epel: ftp.osuosl.org
 * extras: centos.mirror.gtcomm.net
 * ius: ius.mirror.constant.com
 * remi-safe: mirrors.mediatemple.net
 * rpmforge: mirror.us.leaseweb.net
 * updates: centos.mirror.iweb.ca
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56u-gd.x86_64 0:5.6.23-1.ius.centos6 will be installed
--> Processing Dependency: php56u-common(x86-64) = 5.6.23-1.ius.centos6 for package: php56u-gd-5.6.23-1.ius.centos6.x86_64
--> Running transaction check
---> Package php56u-common.x86_64 0:5.6.23-1.ius.centos6 will be installed
--> Processing Dependency: php56u-pecl-jsonc(x86-64) for package: php56u-common-5.6.23-1.ius.centos6.x86_64
--> Running transaction check
---> Package php56u-pecl-jsonc.x86_64 0:1.3.9-2.ius.centos6 will be installed
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.9-2.ius.centos6.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.9-2.ius.centos6.x86_64
--> Running transaction check
---> Package php56u-pear.noarch 1:1.10.1-4.ius.centos6 will be installed
--> Processing Dependency: php56u-xml for package: 1:php56u-pear-1.10.1-4.ius.centos6.noarch
--> Processing Dependency: php56u-posix for package: 1:php56u-pear-1.10.1-4.ius.centos6.noarch
--> Processing Dependency: php56u-cli for package: 1:php56u-pear-1.10.1-4.ius.centos6.noarch
--> Running transaction check
---> Package php56u-cli.x86_64 0:5.6.23-1.ius.centos6 will be installed
---> Package php56u-process.x86_64 0:5.6.23-1.ius.centos6 will be installed
---> Package php56u-xml.x86_64 0:5.6.23-1.ius.centos6 will be installed
--> Finished Dependency Resolution

我该如何解决这个问题? 感谢

1 个答案:

答案 0 :(得分:1)

最后我解决了我的问题......以下是我遵循的步骤:

  • 删除php及其模块: 在我使用的CentOS上:

yum remove php php-cli php-common php-gd php-ldap php-mysql php-odbc php-pdo php-pear php-pecl-apc php-pecl-memcache php-pgsql php-soap php-xml php-xmlrpc

  • 重新安装所需的PHP模块(在我的情况下我需要): sudo yum install php56w sudo yum install php56w-mysql
  • 最后安装GD库:sudo yum install php56w-gd

实际上所有工作都很好