gpt4 book ai didi

php - 升级到 PHP 7 后如何在 CentOS 上安装 mbstring

转载 作者:太空宇宙 更新时间:2023-11-04 12:18:54 26 4
gpt4 key购买 nike

<分区>

首先,

PHP 版本:PHP 7.0.18 &发行版:CentOS Linux 发行版 7.3.1611(核心版)我是 sudo 用户。

我正在设置一个 Themosis安装了 Wordpress,并且我的所有 Apache 配置都运行良好。

Themosis 使用 Composer管理依赖关系。我遇到的问题是当我在应用程序的根目录中运行 composer install 时。应该发生的是 composer 安装站点所需的一切,其中包括 vendor 文件夹和一个名为 cms 的文件夹,其中安装了 Wordpress。我实际得到的是:

 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].

没有制作供应商文件,也没有制作 Wordpress 的 Web 文件夹。到目前为止,这是我尝试过的:

  1. composer 需要 illuminate/support 5.5.*这失败了,因为它需要 mbstring。

结果:

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. 我尝试使用 sudo yum install php-mbstring 安装 mbstring。这没有找到包,所以我按照 this StackOverflow question 中的步骤操作并从镜像 URL 切换到 baseurl=http://centos.intergenia.de/$releasever/updates/$basearch/。这找到了一个包,但仍然失败。这是我们解决实际问题的地方:

    错误:php70u-common 与 php-common-5.4.16-42.el7.x86_64 冲突错误:php70u-json 与 php-common-5.4.16-42.el7.x86_64 冲突

从我的 Google 研究中,我读到您需要为 PHP7 安装额外的存储库,但我不知道这意味着什么,或者这是否是我需要做的,或者如何去做。我不知道谁在我之前拥有这个服务器空间,但我知道在我拿到它之前它已经升级到 PHP 7。

  1. 尝试更新 yum

    磁盘要求:/文件系统至少需要 308MB 以上的空间。

我认为我的问题与 themosis 或 Composer 本身无关。我找到了 this possible solution , (yum install php-mbstring --enablerepo=remi) 但我不想完全破坏我的服务器,而且我不知道如果它出错了如何撤消它。我需要这个 Remi 存储库来解决这个问题吗?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com