2

我已经运行了这个命令

sudo yum 安装 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 ?

4

1 回答 1

2
  1. 您已经从自定义仓库安装了 PHP 7 [phpw70]。[网络统计]
  2. 您正在尝试从 CentOS 基础安装 5.4 软件包 [php-mbstring],因此:

    Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
    

这正是为什么所有 [体面的] 自定义存储库都使用非标准包名称的原因,以免与基础冲突并安装随机、冲突的版本。

  1. yum list php70w*
  2. 找到你想要的包。
  3. yum install $package
于 2016-01-26T23:53:24.787 回答