【发布时间】:2020-10-08 06:22:26
【问题描述】:
我正在尝试通过 composer install 安装 laravel 项目,但作为回报,它给出了以下错误。
Problem 1
- Installation request for laravel/framework v7.14.1 -> satisfiable by laravel/framework[v7.14.1].
- laravel/framework v7.14.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for league/commonmark 1.4.3 -> satisfiable by league/commonmark[1.4.3].
- league/commonmark 1.4.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 3
- Installation request for facade/ignition 2.0.6 -> satisfiable by facade/ignition[2.0.6].
- facade/ignition 2.0.6 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 4
- Installation request for mockery/mockery 1.4.0 -> satisfiable by mockery/mockery[1.4.0].
- mockery/mockery 1.4.0 requires php ^7.3.0 -> your PHP version (7.2.24) does not satisfy that requirement.
Problem 5
- Installation request for phpunit/phpunit 8.5.5 -> satisfiable by phpunit/phpunit[8.5.5].
- phpunit/phpunit 8.5.5 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 6
- Installation request for scrivo/highlight.php v9.18.1.1 -> satisfiable by scrivo/highlight.php[v9.18.1.1].
- scrivo/highlight.php v9.18.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 7
- laravel/framework v7.14.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- facade/flare-client-php 1.3.2 requires illuminate/pipeline ^5.5|^6.0|^7.0 -> satisfiable by laravel/framework[v7.14.1].
- Installation request for facade/flare-client-php 1.3.2 -> satisfiable by facade/flare-client-php[1.3.2].
但是php72中已经安装了mbstring。首先我检查php --v 的版本,它返回了
PHP 7.2.24
然后检查加载的模块php72 -m 并且那里也没有mbstring 没有问题...之后我检查了mbstring 是否启用php72 -i | grep mbstring 并且它已启用
多字节解码支持使用 mbstring => 启用
到底为什么作曲家没有看到mbstring?我正在查看composer show -p 的模块。而且NO没有mbstring!知道为什么作曲家没有看到 mbstring,我该如何解决这个问题?
另外我在 Centos 7
【问题讨论】:
-
您使用 php -v 检查了您的 php 版本,但随后使用 php72 测试了模块,如果您使用
php -m测试会发生什么 -
我已经检查过了,是的,php72 正在运行 imgur.com/a/Vr1fFgd @apokryfos