1

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

2 Answers 2

3

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/7/x86_64/e/epel-release-7-5.noarch.rpm
3
  • 1
    I used yum remove epel-release then rpm --rebuilddb before your command. Commented Jan 28, 2015 at 22:00
  • I did the same, still no love. Package: freetds-0.91-2.el6.x86_64 (epel) Requires: libgnutls.so.26()(64bit). I'm using RHEL 7.2. Commented Dec 8, 2015 at 20:49
  • @acoder your error message still has el6 in it. It appears you did not properly remove the EPEL config for RHEL 6. Commented Dec 8, 2015 at 22:11
0

I'm struggling with the same issue and I know I'm on OS 7.

Should I try to install freetds separately?

Red Hat Enterprise Linux Server release 7.3 (Maipo)

Installed:
  epel-release.noarch 0:7-9

Error: Package: freetds-0.91-2.el6.x86_64 (epel)
           Requires: libgnutls.so.26(GNUTLS_1_4)(64bit)

/usr/lib64/.libgnutls.so.28.41.16.hmac
/usr/lib64/.libgnutls.so.28.hmac
/usr/lib64/libgnutls.so.28
/usr/lib64/libgnutls.so.28.41.16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.