我刚刚在我的 Centos 7 服务器上成功安装了新的 PHP 7。
但是我无法设法安装 PDO。当我更新 yum 然后运行 yum install php-pdo
时,我得到以下输出。
php-pdo 是否需要低于 5.5 的 PHP?
PHP 5 之前安装在我的服务器上,但我删除了它及其所有软件包。
我该如何解决这个问题?
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: mirror.denit.net
* epel: ftp.nluug.nl
* extras: mirror.denit.net
* updates: mirror.denit.net
* webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> 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: php70w-common-7.0.0-1.w7.x86_64 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
最佳答案
我现在解决了我的问题,我可以通过在它前面加上 'php70w' 来安装所有 php 7 兼容的包,例如
yum install php70w-mbstring php70w-json php70w-gd php70w-mcrypt
关于php - 无法在 PHP 7 中安装 PDO(冲突),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34531956/