在Centos 7上为Facebook php sdk安装php-mbstring

时间:2016-01-26 23:42:27

标签: php facebook centos mbstring

我已经运行了这个命令

  

sudo yum install php-mbstring

但是我收到了这个错误

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.tripadvisor.com
 * epel: mirror.cogentco.com
 * extras: mirror.solarvps.com
 * remi-safe: mirrors.mediatemple.net
 * updates: mirror.solarvps.com
 * webtatic: us-east.repo.webtatic.com
No package php-mbstringyum available.
No package install available.
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.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-mbstring-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.2-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
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我该怎么做才能修复并安装php-mbstring?

1 个答案:

答案 0 :(得分:2)

  1. 您已从自定义仓库安装了PHP 7 [phpw70]。 [webtatic]
  2. 您正在尝试从CentOS base安装5.4软件包[php-mbstring],所以:

    Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
    
  3. 这正是为什么所有[体面]自定义存储库都使用非标准软件包名称,以免与基础冲突并安装随机,冲突的版本。

    1. yum list php70w*
    2. 找到你想要的包裹。
    3. yum install $package