Composer require gives errors while installing barryvdh/laravel-dompdf
Solution 1
Don't composer update
. If you have dompdf/dompdf
in your composer.json just update it, specifying 0.8.*
as version and running
composer update dompdf/dompdf
then
composer require barryvdh/laravel-dompdf
--
Running a generic composer update
will affect all your other dependencies you may want keep as they currently are.
All the changes affected by your composer update
command are then recorded in your composer.lock file.
When you'll move your project somewhere else or you'll deploy it on a server for example, the composer install
command will read the composer.lock file and will install the exact version of your dependencies which are recorded in it. So you'll be sure about the version of your dependencies.
Solution 2
Delete your composer.lock
file and run:
composer install
Solution 3
Run this command
composer require barryvdh/laravel-dompdf "^0.8.2"
.
Franko Hysaj
Updated on June 08, 2022Comments
-
Franko Hysaj almost 2 years
I'm quite new with Laravel and wrote my first app.
I'm using Laravel 5.4 with PHP 7.1.5 on Windows, but when I run the
composer require barryvdh/laravel-dompdf
command, I get following issues. I have followed many "possible solutions" but still it is not working.This is the error:
Your requirements could not be resolved to an installable set of packages.
Problem 1 - Installation request for barryvdh/laravel-dompdf ^0.8.1 -> satisfiable by barryvdh/laravel-dom
pdf[v0.8.1]. - barryvdh/laravel-dompdf v0.8.1 requires dompdf/dompdf ^0.8 -> satisfiable by dompdf/dompdf[v0.
8.0, v0.8.1, v0.8.2] but these conflict with your requirements or minimum-stability.