php - 尝试在 ec2 上安装 php-mbstring 的依赖性问题

标签 php amazon-ec2 dependencies yii2 mbstring

我正在尝试在我的 Amazon Linux AMI 实例上安装 yii2,它需要 php-mbstring 扩展才能工作。

当我尝试运行 sudo yum install php-mbstring 时,它返回了这个错误:

Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64

Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                         | 2.1 kB     00:00
amzn-updates/latest                                      | 2.3 kB     00:00
2494 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.3.29-1.8.amzn1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.29-1.8.amzn1 for package: php-mbstring-5.3.29-1.8.amzn1.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.29-1.8.amzn1 will be installed
--> Processing Conflict: php56-common-5.6.9-1.112.amzn1.x86_64 conflicts php-common < 5.5.22-1.98
--> Finished Dependency Resolution
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

提前感谢您的时间

最佳答案

看来你已经安装了 php 5.6。
您需要为该特定版本的 php 安装 mbstring

运行sudo yum install php56-mbstring

之后重新启动 apache 可能是个好主意(谢谢!@hexicle),
使用 sudo service httpd restart

关于php - 尝试在 ec2 上安装 php-mbstring 的依赖性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31190547/

相关文章:

PhpStorm 没有在断点处停止 Xdebug

mysql - 无法连接到通过 Route53 托管的 RDS 只读副本的域名

python : MySQLdb

ios - 框架的部署目标无效

php - 相当于 PHP 的 $_SESSION 的 perl

php - 渲染通过ajax获取的数据表列

php - 在 PHP 中使用 DateTime 作为单行代码

sql-server - 如何使用 Amazon AWS RDS 安装 "Advanced Analytics Extensions"?

haskell - 我如何知道黑客攻击的不一致该归咎于谁

cmake - 为什么 CMake 不检测对我生成的文件的依赖?