我的电子商务网站上的一个库需要 PHP mbstring 库。看起来很简单,只需运行:
yum install php-mbstring
但我得到:
[ec2-user@ip-172-0-0-0 modules]$ sudo yum install php-mbstring
Loaded plugins: priorities, update-motd, upgrade-helper
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.8-1.111.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 Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.6/modules/mbstring.so'^
我不知道下一步该尝试什么......
答案1
您的系统中已安装了 PHP 5.6,但您yum
尝试安装mbstring
PHP 5.3。
您需要mbstring
按照与安装 PHP 5.6 相同的方式安装该扩展。