Composer在安装barryvdh/laravel-dompdf时要求提供错误 [英] Composer require gives errors while installing barryvdh/laravel-dompdf
问题描述
我对laravel很陌生,并写了我的第一个应用程序. 我将Laravel 5.4与PHP 7.1.5结合使用,但是当我运行"composer require barryvdh/laravel-dompdf"命令时,出现以下问题.我遵循了许多可能的解决方案",但仍然无法正常工作. 哦,顺便说一句,我正在使用Windows 这是错误:
I'm quite new with laravel and wrote my first app. I'm using Laravel 5.4 with PHP 7.1.5 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. Oh, BTW, I'm using windows This is the error :
您的要求无法解决为一组可安装的软件包.
Your requirements could not be resolved to an installable set of packages.
问题1 -barryvdh/laravel-dompdf ^ 0.8.1->的安装要求可由barryvdh/laravel-dom pdf [v0.8.1]满足. -barryvdh/laravel-dompdf v0.8.1要求dompdf/dompdf ^ 0.8-> dompdf/dompdf [v0. 8.0,v0.8.1,v0.8.2],但这些与您的要求或最低稳定性冲突.
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.
推荐答案
不要composer update
.如果您在composer.json中包含dompdf/dompdf
,只需对其进行更新,将0.8.*
指定为版本并运行
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
然后
composer require barryvdh/laravel-dompdf
-
运行通用composer update
会影响您可能希望保留的所有其他依存关系.
Running a generic composer update
will affect all your other dependencies you may want keep as they currently are.
所有受composer update
命令影响的更改都将记录在composer.lock文件中.
All the changes affected by your composer update
command are then recorded in your composer.lock file.
当您将项目移动到其他地方或例如将其部署在服务器上时,composer install
命令将读取composer.lock文件并安装记录在其中的依赖项的确切版本.因此,您可以确定依赖项的版本.
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.
这篇关于Composer在安装barryvdh/laravel-dompdf时要求提供错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!