繁体   English   中英

安装 composer 时 dompdf laravel 5.5 错误需要 barryvdh/laravel-dompdf

[英]dompdf laravel 5.5 error while install composer require barryvdh/laravel-dompdf

在 laravel 5.5 中安装 composer require barryvdh / laravel-dompdf 时遇到错误。 为什么?

安装作曲家后我得到了这个错误

Your requirements could not be resolved to an installable set of packages.

Problem 1
- laravel/framework v5.5.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.5.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- laravel/framework v5.5.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
- Installation request for laravel/framework == 5.5.28.0 -> satisfiable by laravel/framework[v5.5.28].

To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

请帮助我,我不知道为什么会出现这样的错误

安装mb-string

sudo apt-get install php-mbstring

或者对于 PHP 7,你可以这样做,

sudo apt-get install php-gd php-xml php7.0-mbstring

我已经安装了所有哦,现在出现错误

Your requirements could not be resolved to an installable set of packages.

  Problem 1
- symfony/event-dispatcher v4.0.2 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement.
- symfony/event-dispatcher v4.0.2 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement.
- symfony/event-dispatcher v4.0.2 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement.
- Installation request for symfony/event-dispatcher == 4.0.2.0 -> satisfiable by symfony/event-dispatcher[v4.0.2].

  Installation failed, reverting ./composer.json to its original content.

您的 composer.json 不符合 php 要求。

应该是例如"php": ">=7.0.0",

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM