简体   繁体   English

无法通过 composer 为 larvel 5.5 下载任何 pdf 包

[英]Unable to download any pdf packages via composer for larvel 5.5

i am using laravel 5.5 with php 7.0 version, I want to generate a pdf, i tried to install many pdf packages, but unable to install because of php 7.0 version, it requires min 7.1 to install any packages, i tried to find packages for 7.0 verision, but failed.我正在使用带有 php 7.0 版本的 laravel 5.5,我想生成一个 pdf,我尝试安装许多 pdf 包,但由于 php 7.0 版本而无法安装,它需要至少 7.1 来安装任何包,我试图找到包7.0 版本,但失败了。 can anyone help me how to install package for php 7.0 veriosn任何人都可以帮助我如何为 php 7.0 veriosn 安装包

Below is the error, that i am getting,以下是我得到的错误,

Your requirements could not be resolved to an installable set of packages.无法将您的要求解析为一组可安装的软件包。 Problem 1 - nwidart/laravel-modules 4.1.0 requires php >=7.1 -> your PHP version (7.0.33) does not satisfy that requirement.问题 1 - nwidart/laravel-modules 4.1.0 需要 php >=7.1 -> 您的 PHP 版本 (7.0.33) 不满足该要求。

There are only 2 solutions out of this, You either upgrade your PHP version to 7.1 or downgrade your package versions which uses PHP7.0其中只有 2 个解决方案,您要么将 PHP 版本升级到 7.1,要么降级使用 PHP7.0 的软件包版本

If you tell me what packages are you using,I could help you out find the packages.如果您告诉我您使用的是哪些软件包,我可以帮助您找到这些软件包。 Let me know what your use case is exactly, or why your cant upgrade to PHP7.1让我知道您的用例到底是什么,或者为什么您不能升级到 PHP7.1

Also it is important to note that PHP7.0 includes security vulnerabilities fixed in PHP7.1, So consider upgrading your framework to at-least Laravel 5.8同样重要的是要注意 PHP7.0 包含在 PHP7.1 中修复的安全漏洞,因此请考虑将您的框架升级到至少Laravel 5.8

Edit:编辑:

here is a package for pdp utilities in laravel 5.5 -> https://github.com/niklasravnsborg/laravel-pdf这是 laravel 5.5 中的 pdp 实用程序包-> https://github.com/niklasravnsborg/laravel-pdf

For laravel5.5 you will have to manually link the packages as auto discovery will not work.对于 laravel5.5,您必须手动链接包,因为自动发现将不起作用。


Edit 2:编辑2:

here is the problem, When you use composer require barryvdh/laravel-dompdf the composer installs the latest package which is 0.8.4 (compatible with PHP7.1 and higher), What you need to do instead is add the package manually to the composer file and then bind the version 0.8.3 like this under the require object -> "barryvdh/laravel-dompdf": "0.8.3" and then run composer update/install in the terminal这是问题所在,当您使用composer require barryvdh/laravel-dompdf ,composer 会安装最新的0.8.4包(与 PHP7.1 及更高版本兼容),您需要做的是手动将包添加到 composer文件,然后像这样在 require 对象下绑定0.8.3版本 -> "barryvdh/laravel-dompdf": "0.8.3"然后在终端中运行composer update/install

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

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