0

I am trying to install php-mssql on centos 7 to connect to a remote mssql server, but when i run 'yum install php-msssql'. I am getting a conflict error

Error: php56w-common conflicts with php-common-5.4.16-42.el7.x86_64
You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
ipa-client-4.4.0-14.el7.centos.6.x86_64 has installed conflicts freeipa-
client: ipa-client-4.4.0-14.el7.centos.6.x86_64
ipa-client-common-4.4.0-14.el7.centos.6.noarch has installed conflicts 
freeipa-client-common: ipa-client-common-4.4.0-14.el7.centos.6.noarch
ipa-common-4.4.0-14.el7.centos.6.noarch has installed conflicts freeipa-
common: ipa-common-4.4.0-14.el7.centos.6.noarch

how can i solve this error and install php-mssql package?

jarus
  • 145
  • 1
  • 8

1 Answers1

1

It looks like you're trying to install the plugin from the webtatic repository while having your base PHP installed from the CentOS base repository. Webtatic expects you to use their PHP packages when installing extra packages using their repository. It also looks like you are trying to install a PHP 5.6 package despite having PHP 5.4 installed. To address this issue, you will either need to switch to using the webtatic base PHP packages, or use another repository to get the php-mssql package.

In this case, I would recommend using the epel repository. You can install it with yum install epel-release. You may have to modify your repository files in /etc/yum.repos.d/ and set repository priorities to prevent conflicts if you have a number of different repositories enabled.

Jenos
  • 636
  • 3
  • 5
  • Thanks @Jenos do you have a link to a tutorial or page how to set the repository priority. – jarus May 04 '17 at 15:51
  • It is usually just a priority=X line inside of the repository file. The lower the number the higher the priority. – Jenos May 04 '17 at 15:53
  • i tried setting epel repo as number one priority and then tried to do "yum install php-mssql" it still gives me the same error. – jarus May 04 '17 at 16:57
  • What is the output of `rpm -qa | grep -i php`? It looks like you might have PHP packages installed from multiple repositories. – Jenos May 04 '17 at 17:04
  • I get this php56w-opcache-5.6.30-1.w7.x86_64 php56w-xml-5.6.30-1.w7.x86_64 php56w-cli-5.6.30-1.w7.x86_64 php56w-devel-5.6.30-1.w7.x86_64 php56w-mbstring-5.6.30-1.w7.x86_64 php56w-5.6.30-1.w7.x86_64 php56w-mysql-5.6.30-1.w7.x86_64 php56w-common-5.6.30-1.w7.x86_64 php56w-gd-5.6.30-1.w7.x86_64 php56w-pdo-5.6.30-1.w7.x86_64 php56w-mcrypt-5.6.30-1.w7.x86_64 php56w-intl-5.6.30-1.w7.x86_64 – jarus May 04 '17 at 17:07
  • You will want to run `yum install php56w-mssql` then, as it looks like you're using webtatic for all of your PHP packages. They keep the filenames different. – Jenos May 04 '17 at 17:09
  • that worked :) thanks, do i need to set the priority to the webtatic, what will be the best approach to handle problems for future. – jarus May 04 '17 at 17:15
  • Webtatic uses a different filename to prevent any conflicts. You will just need to ensure you're using "php56w" instead of "php" when installing packages until you change versions. – Jenos May 04 '17 at 17:22