Andrei Kap
Andrei Kap

Reputation: 53

Failed to install php 5.6 mssql - Centos 7

i'm trying to move an application that was running on an windows web server to a linux web serve which runs on Centos 7. The application it's based on calling Microsoft SQL Procedures and i've used sqlsrv driver when i've built it.But now when i've moved it to the new server obviously it's not working becaouse sqlsrv driver it's not supported by linux from what i've read.

The problem is that i'm trying to install php-mssql in order to re-write my code to use this driver but i cannot install the package on Centos 7 using PHP 5.6.13. When i try to install the package i get the following and i don't know how to fix it or to go further :

[root@localhost /]# yum install php56w-mssql
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.ines.lug.ro
* epel: fedora.mirrors.telekom.ro
* extras: ftp.ines.lug.ro
* updates: ftp.ines.lug.ro
* webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56w-mssql.x86_64 0:5.6.13-1.w7 will be installed
--> Processing Dependency: php56w-pdo(x86-64) = 5.6.13-1.w7 for package: php56w-mssql-5.6.13-1.w7.x86_64
--> Processing Dependency: libsybdb.so.5()(64bit) for package: php56w-mssql-5.6.13-1.w7.x86_64
--> Running transaction check
---> Package freetds.x86_64 0:0.91-12.git0a42888.el7 will be installed
--> Processing Dependency: libodbcinst.so.2()(64bit) for package: freetds-0.91-12.git0a42888.el7.x86_64
--> Processing Dependency: libodbc.so.2()(64bit) for package: freetds-0.91-12.git0a42888.el7.x86_64
---> Package php56w-pdo.x86_64 0:5.6.13-1.w7 will be installed
--> Processing Dependency: php56w-common(x86-64) = 5.6.13-1.w7 for package: php56w-pdo-5.6.13-1.w7.x86_64
--> Running transaction check
---> Package php56w-common.x86_64 0:5.6.13-1.w7 will be installed
---> Package unixODBC.x86_64 0:2.3.1-10.el7 will be installed
--> Processing Dependency: libltdl.so.7()(64bit) for package: unixODBC-2.3.1-10.el7.x86_64
--> Running transaction check
---> Package libtool-ltdl.x86_64 0:2.4.2-20.el7 will be installed
Removing php56w-pdo.x86_64 0:5.6.13-1.w7 - u due to obsoletes from installed php-pdo-5.6.13-1.el7.remi.x86_64
Removing php56w-common.x86_64 0:5.6.13-1.w7 - u due to obsoletes from installed php-common-5.6.13-1.el7.remi.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php56w-common.x86_64 0:5.6.13-1.w7 will be installed
---> Package php56w-pdo.x86_64 0:5.6.13-1.w7 will be installed
--> Processing Dependency: php56w-pdo(x86-64) = 5.6.13-1.w7 for package: php56w-mssql-5.6.13-1.w7.x86_64
--> Finished Dependency Resolution
Error: Package: php56w-mssql-5.6.13-1.w7.x86_64 (webtatic)
       Requires: php56w-pdo(x86-64) = 5.6.13-1.w7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Do you have any suggestions ?

Thank you

Upvotes: 0

Views: 6382

Answers (2)

Remi Collet
Remi Collet

Reputation: 7051

According to output, PHP is installed from "remi-php56" which is not enabled (by default). Good idea to enable it, to avoid such issues.

yum-config-manager --enable remi-php56

And then

yum install php-mssql

And terrible idea to mix various 3rd party repositories. So @machavity proposal to exclude php packages from webtatic is correct.

Upvotes: 5

Machavity
Machavity

Reputation: 31644

You've got two competing packages there. php.remi vs php56.webtatic

It looks like the remi is already installed. So what you need to do is find your webtatic repo file (probably something like /etc/yum.repos.d/webtatic.repo) and add this line below the [webtatic] repo

exclude=php56*

That should prevent the webtatic repo from feeding you PHP files. Then you should be able to do

yum install php-mssql

Which will pull from remi and work with what's already installed

Upvotes: 3

Related Questions