douhui7136 2017-10-05 16:08
浏览 97

如何在升级到PHP 7后在CentOS上安装mbstring [重复]

This question already has an answer here:

First,

PHP version: PHP 7.0.18 & distro: CentOS Linux release 7.3.1611 (Core) I am a sudo user.

I am setting up a Themosis Wordpress install, and I have all of the apache config stuff working great.

Themosis uses Composer to manage dependencies. The issue I'm having is when I run composer install in the root of my application. What's supposed to happen is that composer installs everything I need for the site, which includes a vendor folder, and a folder called cms with a Wordpress installation. What I actually get is this:

 Problem 1
    - illuminate/database v5.5.0 requires illuminate/support 5.5.* -> satisfiable by illuminate/support[v5.5.0, v5.5.2].
    - illuminate/database v5.5.2 requires illuminate/support 5.5.* -> satisfiable by illuminate/support[v5.5.0, v5.5.2].
    - illuminate/database v5.4.0 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
    - illuminate/database v5.4.13 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
    - illuminate/database v5.4.17 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
    - illuminate/database v5.4.19 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
    - illuminate/database v5.4.27 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
    - illuminate/database v5.4.36 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
    - illuminate/database v5.4.9 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
    - illuminate/database v5.3.0 requires illuminate/support 5.3.* -> satisfiable by illuminate/support[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
    - illuminate/database v5.3.16 requires illuminate/support 5.3.* -> satisfiable by illuminate/support[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
    - illuminate/database v5.3.23 requires illuminate/support 5.3.* -> satisfiable by illuminate/support[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
    - illuminate/database v5.3.4 requires illuminate/support 5.3.* -> satisfiable by illuminate/support[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
    - illuminate/support v5.5.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.5.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.4.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.4.36 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.4.27 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.4.19 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.4.17 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.4.13 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.4.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.3.4 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.3.23 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.3.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - illuminate/support v5.3.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - Installation request for illuminate/database ^5.3 -> satisfiable by illuminate/database[v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.2].

The vendor file is not made, and neither is the web folder that holds Wordpress. Here's what I've tried so far:

  1. composer require illuminate/support 5.5.* This fails because it requires mbstring.

Result:

Problem 1
- illuminate/support v5.5.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- illuminate/support v5.5.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- Installation request for illuminate/support 5.5.* -> satisfiable by illuminate/support[v5.5.0, v5.5.2].
  1. I tried to install mbstring with sudo yum install php-mbstring. This didn't find a package, so I followed the steps in this StackOverflow question and switched from the mirror URL to baseurl=http://centos.intergenia.de/$releasever/updates/$basearch/. This found a package but still failed. Here's where we get to the actual problem:

    Error: php70u-common conflicts with php-common-5.4.16-42.el7.x86_64 Error: php70u-json conflicts with php-common-5.4.16-42.el7.x86_64

From my Google research, I read that you need to install extra repositories for PHP7, but I have no idea what that means, or if that's what I need to do, or how to do it. I don't know who had this server space before me, but I know it had been upgraded to PHP 7 just before I got my hands on it.

  1. Tried to update yum

    Disk Requirements: At least 308MB more space needed on the / filesystem.

I don't believe my issue is related to themosis, or Composer itself. I found this possible solution, (yum install php-mbstring --enablerepo=remi) but don't want to completely wreck my server and I don't know how to undo that one if it's wrong. Is this Remi repository what I need to fix this?

</div>
  • 写回答

1条回答 默认 最新

  • duanmeng2842 2017-10-05 16:59
    关注

    You need to install additional extensions is the same package namespace that the already installed packages:

    • remi: php-mbstring (see the Wizard)
    • webtatic: php70w-mbstring
    • IUS: php70u-mbstring
    • etc
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!