我正在尝试使用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
我还尝试删除第一个 php
yum erase php54
并再次安装
yum install php54 with pgsql
但它返回相同的错误。
我不明白我应该解决什么?
从那个 yum 错误来看,您似乎安装了 PHP 5.3 并正在尝试安装 PHP 5.4 软件包。 如果您安装了 PHP 5.3,yum erase php54
将无所事事。
你想要 PHP 5.3 还是 5.4? 根据这一点,您需要确保存储库中具有所需版本的正确包,并尝试再次安装 php-pgsql 包。