Не удалось запустить composer для установки laravel 7 - PullRequest
0 голосов
/ 26 апреля 2020

Здравствуйте. Я нашел здесь проблему, из-за которой я не могу запустить composer, и я получаю следующую ошибку:

Ошибка при выполнении composer установки

Do not run Composer as root / superuser! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from the lock file
Your requirements could not be resolved for an installable set of packages.

Issue 1
- Installation request for hashids / hashids 4.0.0 -> satisfactory for hashids / hashids [4.0.0].
- hashids / hashids 4.0.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing on your system.
Issue 2
- Request for installation of laravel / framework v7.4.0 -> satisfactory for laravel / framework [v7.4.0].
- laravel / framework v7.4.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing on your system.
Issue 3
- Installation request for lcobucci / jwt 3.3.1 -> satisfactory by lcobucci / jwt [3.3.1].
- lcobucci / jwt 3.3.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing on your system.
Issue 4
- Request for installation of the alloy / common brand 1.3.2 -> satisfactory by the alloy / common brand [1.3.2].
- league / commonmark 1.3.2 requires ext-mbstring * -> the requested mbstring PHP extension is missing from your system.
Issue 5
- Request for installation of the facade / ignition 2.0.2 -> satisfactory for the facade / ignition [2.0.2].
- facade / ignition 2.0.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing on your system.
Issue 6
- Request to install phpunit / phpunit 8.5.3 -> satisfactory by phpunit / phpunit [8.5.3].
- phpunit / phpunit 8.5.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing on your system.
Issue 7
- Request to install the scrivo / highlighted.php v9.18.1.1 -> satisfactory by the scrivo / highlighted.php [v9.18.1.1].
- scrivo / highlighted.php v9.18.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing on your system.
Issue 8
- laravel / framework v7.4.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing on your system.
- facade / flare-client-php 1.3.2 requires lighting / pipeline ^ 5.5 | ^ 6.0 | ^ 7.0 -> satisfactory by laravel / framework [v7.4.0].
- Installation request for facade / flare-client-php 1.3.2 -> satisfactory for facade / flare-client-php [1.3.2].


You can also run `php --ini` inside the terminal to see which files are used by PHP in CLI mode.

Кто-нибудь знает, как сказать мне, где я иду не так? И как мне решить эту проблему?

1 Ответ

0 голосов
/ 26 апреля 2020

Laravel 7 требует следующих php модулей

  • php -zip
  • php - mysql
  • php -mcrypt
  • php - xml
  • php -mbstring

используйте следующий код для их установки на fedora / centos / rhel. Это установит только отсутствующие модули,

yum --enablerepo=remi,epel install php-zip php-mysql php-mcrypt php-xml php-mbstring

service httpd restart

для Ubuntu / Debian. Проверьте текущую установленную версию php и установите модули соответственно. например, если установлен php 7.2, используйте следующий код.

sudo apt install libapache2-mod-php7.2 php7.2-mcrypt php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-zip php7.2-mysql

sudo systemctl restart apache2.service
...