指引网

当前位置: 主页 > 服务器 > Nginx >

contos安装php gd库报错Error: php56w-common conflicts with php-common-5.3.3-48.el6_8.x86_64

来源:网络 作者:佚名 点击: 时间:2017-08-02 23:29
[摘要] 今天在公司服务器安装php gd库,因为系统是contos,就是用yum去安装,一安装就报错如下:
今天在公司服务器安装php gd库,因为系统是contos,就是用yum去安装,一安装就报错如下:

[root@iZ28sdxghs2Z ~]# yum install php-gd
Loaded plugins: security
Setting up Install Process
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
base                                                                                   | 3.7 kB     00:00     
extras                                                                                 | 3.4 kB     00:00     
updates                                                                                | 3.4 kB     00:00     
updates/primary_db                                                                     | 3.1 MB     00:00     
webtatic                                                                               | 3.6 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-48.el6_8 for package: php-gd-5.3.3-48.el6_8.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.3.3-48.el6_8.x86_64
--> Running transaction check
---> Package libXpm.x86_64 0:3.5.10-2.el6 will be installed
---> Package php-common.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Conflict: php56w-common-5.6.22-1.w6.x86_64 conflicts php-common < 5.5.0
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php56w-common.x86_64 0:5.6.22-1.w6 will be updated
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-mbstring-5.6.22-1.w6.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-pdo-5.6.22-1.w6.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-fpm-5.6.22-1.w6.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-5.6.22-1.w6.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-cli-5.6.22-1.w6.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-xml-5.6.22-1.w6.x86_64
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-process-5.6.22-1.w6.x86_64
---> Package php56w-common.x86_64 0:5.6.26-1.w6 will be an update
--> Running transaction check
---> Package php56w.x86_64 0:5.6.22-1.w6 will be updated
---> Package php56w.x86_64 0:5.6.26-1.w6 will be an update
---> Package php56w-cli.x86_64 0:5.6.22-1.w6 will be updated
--> Processing Dependency: php56w-cli(x86-64) = 5.6.22-1.w6 for package: php56w-devel-5.6.22-1.w6.x86_64
---> Package php56w-cli.x86_64 0:5.6.26-1.w6 will be an update
---> Package php56w-fpm.x86_64 0:5.6.22-1.w6 will be updated
---> Package php56w-fpm.x86_64 0:5.6.26-1.w6 will be an update
---> Package php56w-mbstring.x86_64 0:5.6.22-1.w6 will be updated
---> Package php56w-mbstring.x86_64 0:5.6.26-1.w6 will be an update
---> Package php56w-pdo.x86_64 0:5.6.22-1.w6 will be updated
--> Processing Dependency: php56w-pdo(x86-64) = 5.6.22-1.w6 for package: php56w-odbc-5.6.22-1.w6.x86_64
---> Package php56w-pdo.x86_64 0:5.6.26-1.w6 will be an update
---> Package php56w-process.x86_64 0:5.6.22-1.w6 will be updated
---> Package php56w-process.x86_64 0:5.6.26-1.w6 will be an update
---> Package php56w-xml.x86_64 0:5.6.22-1.w6 will be updated
---> Package php56w-xml.x86_64 0:5.6.26-1.w6 will be an update
--> Running transaction check
---> Package php56w-devel.x86_64 0:5.6.22-1.w6 will be updated
---> Package php56w-devel.x86_64 0:5.6.26-1.w6 will be an update
---> Package php56w-odbc.x86_64 0:5.6.22-1.w6 will be updated
---> Package php56w-odbc.x86_64 0:5.6.26-1.w6 will be an update
--> Processing Conflict: php56w-common-5.6.26-1.w6.x86_64 conflicts php-common < 5.6
--> Finished Dependency Resolution
Error: php56w-common conflicts with php-common-5.3.3-48.el6_8.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

大概的意思是错误:php56w-common与php-common-5.3.3-48.el6_8.x86_64冲突

后来phpinfo看了一下php版本,如下图:

contos安装php gd库报错Error: php56w-common conflicts with php-common-5.3.3-48.el6_8.x86_64

那为啥会出现冲突错误呢? 后来问了一下公司的老员工,说服务器以前装过5.3的版本。

那如何解决呢?

答案就是使用    yum install php56w-gd  安装,ok 问题解决,记录一下。
 
------分隔线----------------------------