Can't Install php-mssql or freetds on Centos7

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

My goal is to connect to MS SQL Server 2005 using PHP. I have installed PHP and ODBC. I am running CentOS7.

PHP Version => 5.4.16

.... (from php -i) ....

odbc

ODBC Support => enabled

I am running into 2 dependency issues when trying to install freetds and php-mssql extension. (see below)

[root@localhost freetds-dev.0.92.377]# yum install php-mssql freetds
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.supremebytes.com
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.cat.pdx.edu
 * rpmforge: mirror.hmc.edu
 * updates: ftp.osuosl.org
Resolving Dependencies
--> Running transaction check
---> Package freetds.x86_64 0:0.91-2.el6 will be installed
--> Processing Dependency: libgnutls.so.26(GNUTLS_1_4)(64bit) for package: freetds-0.91-2.el6.x86_64
--> Processing Dependency: libgnutls.so.26()(64bit) for package: freetds-0.91-2.el6.x86_64
---> Package php-mssql.x86_64 0:5.3.3-3.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-mssql-5.3.3-3.el6.x86_64
--> Processing Dependency: php(api) = 20090626 for package: php-mssql-5.3.3-3.el6.x86_64
--> Finished Dependency Resolution
Error: Package: freetds-0.91-2.el6.x86_64 (epel)
           Requires: libgnutls.so.26()(64bit)
Error: Package: php-mssql-5.3.3-3.el6.x86_64 (epel)
           Requires: php(api) = 20090626
           Installed: php-common-5.4.16-23.el7_0.3.x86_64 (@updates)
               php(api) = 20100412-64
           Available: php-common-5.4.16-21.el7.x86_64 (base)
               php(api) = 20100412-64
           Available: php-common-5.4.16-23.el7_0.x86_64 (updates)
               php(api) = 20100412-64
           Available: php-common-5.4.16-23.el7_0.1.x86_64 (updates)
               php(api) = 20100412-64
Error: Package: freetds-0.91-2.el6.x86_64 (epel)
           Requires: libgnutls.so.26(GNUTLS_1_4)(64bit)
Error: Package: php-mssql-5.3.3-3.el6.x86_64 (epel)
           Requires: php(zend-abi) = 20090626
           Installed: php-common-5.4.16-23.el7_0.3.x86_64 (@updates)
               php(zend-abi) = 20100525-64
           Available: php-common-5.4.16-21.el7.x86_64 (base)
               php(zend-abi) = 20100525-64
           Available: php-common-5.4.16-23.el7_0.x86_64 (updates)
               php(zend-abi) = 20100525-64
           Available: php-common-5.4.16-23.el7_0.1.x86_64 (updates)
               php(zend-abi) = 20100525-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I have libgnutls.so version 28 though

/usr/lib64/libgnutls.so.28
/usr/lib64/libgnutls.so.28.20.4
profilepic.png
manpreet 2 years ago

The package you are trying to install has el6 in the version, indicating it is for CentOS 6, not 7. It appears you have added the EPEL repository for the wrong version CentOS. You should remove the yum configuration for EPEL6 and add the configuration for 7. You can add the configuration for 7 with the following:

rpm -Uvh http://mirror.oss.ou.edu/epel/https://forum.tuteehub.com/tag/7">7/x86_64/e/epel-release-https://forum.tuteehub.com/tag/7">7-5.noarch.rpm

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.