简体   繁体   English

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

[英]Dependency issue trying to install php-mbstring on ec2

I am trying to install yii2 on my Amazon Linux AMI instance, it requires the php-mbstring extension to work. 我正在尝试在Amazon Linux AMI实例上安装yii2 ,它需要php-mbstring扩展名才能工作。

When I tried to run sudo yum install php-mbstring it returned this error: 当我尝试运行sudo yum install php-mbstring它返回以下错误:

Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64 错误:php56-common与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

Thanks for your time in advance 谢谢你的时间

It seems you have php 5.6 installed. 看来您已安装php 5.6。
You need to install mbstring for that particular version of php . 您需要为特定版本的php安装mbstring

Run sudo yum install php56-mbstring 运行sudo yum install php56-mbstring

After that it might be a good idea to restart apache (thanks! @hexicle ), 之后,最好重新启动apache(谢谢! @hexicle ),
using sudo service httpd restart 使用sudo service httpd restart

Amazon Linux AMI release 2017.09 Amazon Linux AMI版本2017.09

sudo yum install php70-mysqlnd
sudo service httpd restart

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM