简体   繁体   中英

dompdf laravel 5.5 error while install composer require barryvdh/laravel-dompdf

I encountered an error when install composer require barryvdh / laravel-dompdf in laravel 5.5. why?

after install composer i got this error

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.

Please help me, i dont know why getting error like this

Install mb-string package

sudo apt-get install php-mbstring

Or for PHP 7 you can do,

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

I have installed all oh this, and now get error

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.

your composer.json is wrong for the php-requirement.

should be eg "php": ">=7.0.0",

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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