【问题标题】:How to install mbstring extension如何安装mbstring扩展
【发布时间】:2015-01-29 01:08:21
【问题描述】:

当我在 Centos 中安装 mbstring 时,我收到以下错误消息。

# yum install php-mbstring
Loaded plugins: downloadonly, fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.vastspace.net
 * epel: ftp.riken.jp
 * extras: mirror.vastspace.net
 * updates: mirror.vastspace.net
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.3.3-40.el6_6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-40.el6_6 for package:php-mbstring-5.3.3-40.el6_6.x86_64
--> Finished Dependency Resolution
Error: Package: php-mbstring-5.3.3-40.el6_6.x86_64 (updates)
           Requires: php-common(x86-64) = 5.3.3-40.el6_6
           Installed: php-common-5.4.35-1.el6.remi.x86_64 (@remi)
               php-common(x86-64) = 5.4.35-1.el6.remi
           Available: php-common-5.3.3-38.el6.x86_64 (base)
               php-common(x86-64) = 5.3.3-38.el6
           Available: php-common-5.3.3-40.el6_6.x86_64 (updates)
               php-common(x86-64) = 5.3.3-40.el6_6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

谁能告诉我如何安装mbstring??

我的 PHP 版本:Centos 6.6 上的 PHP 5.4.35 (cli)(构建时间:2014 年 11 月 14 日 07:04:10)

提前谢谢你...

【问题讨论】:

  • 哈哈哈,我也遇到了同样的问题(在某些论坛上说我们需要重新编译扩展),希望有人回答这个问题
  • 你应该在 serverFault 上问这个问题

标签: php centos6 mbstring


【解决方案1】:
yum install php-mbstring --enablerepo=remi

我通过这个命令使用 remi 安装了 php-mbstring。 运行后需要重启Apache服务。

【讨论】:

    【解决方案2】:

    要为您的 PHP 版本搜索正确的 MB-String,请尝试以下命令:

    sudo yum list | egrep 'php' | grep 50
    

    通过您在服务器中安装的特定 PHP 版本更改 (50),此命令将显示与您的 PHP 版本相关的所有包。
    此命令将显示:

     ea-php50-php-mbstring.x86_64
    

    现在您可以安装与您的系统兼容的版本。我希望它对您有用。

    【讨论】:

      猜你喜欢
      • 2017-05-09
      • 2015-04-30
      • 2015-04-28
      • 2017-01-26
      • 1970-01-01
      • 2017-05-13
      • 2011-06-14
      • 2015-09-26
      • 2018-02-20
      相关资源
      最近更新 更多