Yum:php55w-common 与 php-common-5.4 冲突

Yum:php55w-common 与 php-common-5.4 冲突

我正在尝试使用命令行在mysqliCentOS 机器上进行安装,但我一直收到消息:yum install php-mysqlnd.x86_64

Error: php55w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
  You could try using --skip-broken to work around the problem
  You could try running: rpm -Va --nofiles --nodigest

所建议的任何解决方法都对解决问题没有任何帮助。

这是我尝试安装时显示的全文:

sudo yum install php-mysqlnd.x86_64 Loaded plugins: fastestmirror, replace Loading mirror speeds from cached hostfile * base: mirror.acsnet.com * extras: mirrors.chkhosting.com * rpmforge: mirror.webnx.com * updates: mirror.netdepot.com Resolving Dependencies --> Running transaction check ---> Package php-mysqlnd.x86_64 0:5.4.16-36.el7_1 will be installed --> Processing Dependency: php-pdo(x86-64) = 5.4.16-36.el7_1 for package: php-mysqlnd-5.4.16-36.el7_1.x86_64 --> Running transaction check ---> Package php-pdo.x86_64 0:5.4.16-36.el7_1 will be installed --> Processing Dependency: php-common(x86-64) = 5.4.16-36.el7_1 for package: php-pdo-5.4.16-36.el7_1.x86_64 --> Running transaction check ---> Package php-common.x86_64 0:5.4.16-36.el7_1 will be installed --> Processing Conflict: php55w-common-5.5.26-1.w7.x86_64 conflicts php-common < 5.5.0 --> Finished Dependency Resolution Error: php55w-common conflicts with php-common-5.4.16-36.el7_1.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

看起来它正在尝试安装 php 5.4 而不是 5.5,这是我需要安装的版本......

关于如何在 CentOs 7 上安装 mysqli 并与 php 5.5 一起使用,您有什么想法吗?我尝试遵循了几个指南,但由于依赖性问题,我无法完成安装步骤。

答案1

我必须安装 php 5.5 的 rpm。

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

然后运行:

sudo yum install php55w-mysqlnd.x86_64

仔细检查php.ini文件以确保 mysqli 已启用,然后使用 重新启动 httpd 服务sudo systemctl restart httpd.service

那就可以了!

相关内容