سؤال

I am trying to connect to a PostgreSQL Database with PHP.. PHP was already installed. When I tried to execute the following code on the Command Line (Centos) the error below returns

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

I also tried to remove first php with

yum erase php54

and install it again with

yum install php54 with pgsql

but it returns the same error.

I couldn't understand what I should fix?

هل كانت مفيدة؟

المحلول

From that yum error, it looks like you have PHP 5.3 installed and are trying to install a PHP 5.4 package. yum erase php54 will do nothing if you have PHP 5.3 installed.

Do you want PHP 5.3 or 5.4? Depending on that, you'll need to make sure the proper packages are in your repos for the version you want, and try to install the php-pgsql package again.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top