centos安装php-odbc依赖

centos install php-odbc dependicies

I 运行 "yum install php-odbc"命令在centos6.x64 和终端中的响应消息:

yum install php-odbc
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: repo.boun.edu.tr
 * epel: mirror.fraunhofer.de
 * extras: mirror.alastyr.com
 * updates: repo.boun.edu.tr
 * webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php-odbc.x86_64 0:5.3.3-46.el6_6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-46.el6_6 for package: php-odbc-5.3.3-46.el6_6.x86_64
--> Finished Dependency Resolution
Error: Package: php-odbc-5.3.3-46.el6_6.x86_64 (updates)
           Requires: php-common(x86-64) = 5.3.3-46.el6_6
           Installed: php-common-5.6.13-1.el6.remi.x86_64 (installed)
               php-common(x86-64) = 5.6.13-1.el6.remi
           Available: php-common-5.3.3-40.el6_6.x86_64 (base)
               php-common(x86-64) = 5.3.3-40.el6_6
           Available: php-common-5.3.3-46.el6_6.x86_64 (updates)
               php-common(x86-64) = 5.3.3-46.el6_6
           Available: php54w-common-5.4.45-2.w6.x86_64 (webtatic)
               php-common(x86-64) = 5.4.45-2.w6
           Available: php55w-common-5.5.30-2.w6.x86_64 (webtatic)
               php-common(x86-64) = 5.5.30-2.w6
           Available: php56w-common-5.6.14-2.w6.x86_64 (webtatic)
               php-common(x86-64) = 5.6.14-2.w6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

很明显我需要安装这些包,但我怎么能......我实际上要求针对此类问题的通用解决方案。如何使用当前安装安装所有依赖包。

已编辑:"php -v" 回复:

这一行:

Installed: php-common-5.6.13-1.el6.remi.x86_64 (installed)

告诉我你可能 运行 PHP 5.6 从 remi repository.

安装

查看 /etc/yum.repos.d/,看看是否有 .repo 个名称以 remi 开头的文件。特别是 remi.repo.

如果有,请尝试使用以下方式安装:

yum --enablerepo=remi --enablerepo=remi-php56 install php-odbc