我正在尝试使用PHP连接到PostgreSQL数据库.. PHP已经安装。当我尝试在命令行(Centos)上执行以下代码时,下面的错误返回
yum install php-pgsql
Transaction Check Error: file /etc/php.ini from install of php-common-5.3.3-27.el6_5.x86_64 conflicts with file from package php54-common-5.4.24-1.ius.centos6.x86_64 file /usr/lib64/php/modules/curl.so from install of php-common-5.3.3-27.el6_5.x86_64 conflicts with file from package php54-common-5.4.24-1.ius.centos6.x86_64 file /usr/lib64/php/modules/fileinfo.so from install of php-common-5.3.3-27.el6_5.x86_64 conflicts with file from package php54-common-5.4.24-1.ius.centos6.x86_64 file /usr/lib64/php/modules/json.so from install of php-common-5.3.3-27.el6_5.x86_64 conflicts with file from package php54-common-5.4.24-1.ius.centos6.x86_64 file /usr/lib64/php/modules/phar.so from install of php-common-5.3.3-27.el6_5.x86_64 conflicts with file from package php54-common-5.4.24-1.ius.centos6.x86_64 file /usr/lib64/php/modules/zip.so from install of php-common-5.3.3-27.el6_5.x86_64 conflicts with file from package php54-common-5.4.24-1.ius.centos6.x86_64
我还试图用
删除第一个phpyum erase php54
并使用
重新安装yum install php54 with pgsql
但它返回相同的错误。
我无法理解我应该修复什么?
答案 0 :(得分:2)
从yum错误看,你看起来已经安装了PHP 5.3并且正在尝试安装PHP 5.4软件包。如果安装了PHP 5.3,yum erase php54
将无效。
你想要PHP 5.3还是5.4?根据这一点,您需要确保所需版本的repos中包含正确的软件包,并尝试再次安装php-pgsql软件包。