【问题标题】:php-mbstring won't install on CentOS 7 and PHP 7.1.21php-mbstring 不会安装在 CentOS 7 和 PHP 7.1.21
【发布时间】:2019-06-04 20:21:32
【问题描述】:

需要在运行 PHP 7.1.21 的 CentOS 7 服务器上安装 php-mbstring。我花了几个小时尝试我能找到的所有可能的解决方案。尝试使用 remi repo 安装时似乎存在冲突。无论我尝试什么,我能得到的最好结果如下:

# yum install php-mbstring
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: mirror.steadfastnet.com
 * epel: mirror.steadfastnet.com
 * extras: mirror.steadfastnet.com
 * remi-php71: mirror.team-cymru.com
 * remi-safe: mirror.team-cymru.com
 * updates: mirror.steadfastnet.com
base                                                         | 3.6 kB  00:00:00
extras                                                       | 3.4 kB  00:00:00
updates                                                      | 3.4 kB  00:00:00
Excluding 8 updates due to versionlock (use "yum versionlock status" to show them)
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:7.1.26-1.el7.remi will be installed
--> Processing Dependency: php-common(x86-64) = 7.1.26-1.el7.remi for package: php-mbstring-7.1.26-1.el7.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-mbstring-7.1.26-1.el7.remi.x86_64 (remi-php71)
           Requires: php-common(x86-64) = 7.1.26-1.el7.remi
           Installed: php-common-7.1.21-1.el7.remi.x86_64 (@remi-php71)
               php-common(x86-64) = 7.1.21-1.el7.remi
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

有什么想法吗?

【问题讨论】:

  • 这个是找到安装php-mbstring解决方案的链接:[centOS 7 Can't install php-mbstring extension][1] [1]:http://%20%20% 20https://stackoverflow.com/questions/28739892/centos-7-cant-install-php-mbstring-extension/54705183#54705183

标签: php centos mbstring


【解决方案1】:

由于版本锁定而排除 8 个更新(使用“yum versionlock status”显示)

上述消息中的解释。

当当前可用版本为 7.1.26 时,您已安装 php 版本 7.1.21。

存储库仅在线提供 2 个最新版本。 所以需要手动下载安装OLD包:php-mbstring-7.1.21-1.el7.remi.x86_64.rpm

或者更好的是,取消此版本的锁定。 “remi-php71”存储库将始终提供 7.1.x,您只会收到新的次要版本。

PHP 7.1 现在处于安全模式,7.1.21 受到很多公共安全问题的影响。

【讨论】:

  • 这是我需要的确切解释,谢谢!对于其他偶然发现这篇文章的人,我只运行了yum versionlock clear 并且能够安装我需要的东西。尽管从长远来看,将 PHP 更新到更安全的版本将是理想的选择。
  • 奇怪的是,在 Centos 7 上使用 yum 和 Remi 时,mbstring 已安装但未出现在模块列表中。遇到此提示,我直接从 RPM 文件安装,现在一切正常。如果 yum install 无法正常工作,请记住一些事情。
猜你喜欢
  • 2016-05-03
  • 2015-04-28
  • 2017-01-18
  • 2012-05-03
  • 2019-01-06
  • 2018-03-17
  • 2015-04-05
  • 2019-06-22
相关资源
最近更新 更多