Centos7にphp-mssqlまたはfreetdsをインストールすることはできません。

Centos7にphp-mssqlまたはfreetdsをインストールすることはできません。

私の目標は、PHPを使用してMS SQL Server 2005に接続することです。 PHPとODBCをインストールしました。 CentOS7を実行しています。

PHP Version => 5.4.16

....(php -iから)....

odbc

ODBC Support => enabled

freetdsおよびphp-mssql拡張のインストール中に2つの依存関係の問題が発生しました。 (下記参照)

[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

libgnutls.soバージョン28があります。

/usr/lib64/libgnutls.so.28
/usr/lib64/libgnutls.so.28.20.4

ベストアンサー1

インストールするパッケージは、el6CentOS 7ではなくCentOS 6用のバージョンです。間違ったCentOSバージョンのEPELリポジトリを追加したようです。 EPEL6の設定を削除しyum、7の設定を追加する必要があります。次のコマンドを使用して、7の設定を追加できます。

rpm -Uvh http://mirror.oss.ou.edu/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

おすすめ記事