我需要在我的项目中安装DomPDf。所以,我添加“barryvdh/laravel-dompdf”:“v0.7.0”,作曲家需要阻止。当我更新错误以后的作曲家显示。请告诉我我的错误....请指定要我..您的要求无法解决:无法打开流:权限被拒绝
终端错误
Your requirements could not be resolved to an installable set of packages.
Problem 1
- dompdf/dompdf v0.7.0-beta3 requires phenx/php-font-lib 0.4.* -> no matching package found.
- dompdf/dompdf v0.7.0-beta2 requires phenx/php-font-lib 0.4.* -> no matching package found.
- dompdf/dompdf v0.7.0-beta requires phenx/php-font-lib 0.3.* -> no matching package found.
- dompdf/dompdf v0.7.0 requires phenx/php-font-lib 0.4.* -> no matching package found.
- dompdf/dompdf 0.7.x-dev requires phenx/php-font-lib 0.5.* -> no matching package found.
- barryvdh/laravel-dompdf v0.7.0 requires dompdf/dompdf ^0.7 -> satisfiable by dompdf/dompdf[0.7.x-dev, v0.7.0, v0.7.0-beta, v0.7.0-beta2, v0.7.0-beta3].
- Installation request for barryvdh/laravel-dompdf v0.7.0 -> satisfiable by barryvdh/laravel-dompdf[v0.7.0].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
我作曲代码
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"minimum-stability" : "dev",
"prefer-stable": true,
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"barryvdh/laravel-debugbar": "^2.3",
"barryvdh/laravel-dompdf": "v0.7.0",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"uxweb/sweet-alert": "^1.4"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
}
我也试过:
composer require barryvdh/laravel-dompdf
但它显示以下错误:
Error : Using version ^0.8.0 for barryvdh/laravel-dompdf ./composer.json has been updated Loading composer repositories with package information
Updating dependencies (including require-dev)
file_put_contents(/home/w3cert/.composer/cache/repo/https---packagist.org/p-provider-2017-01.json): failed to open stream: Permission denied
packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Your requirements could not be resolved to an installable set of packages.
同样的错误发现... @Plxx问题1 - DOMPDF/DOMPDF v0.8.0需要phenx/PHP -font-lib 0.5。* - >找不到匹配的包。 - barryvdh/laravel-dompdf v0.8.0要求dompdf/dompdf^0.8 - >可通过dompdf/dompdf [v0.8.0]满足。 - barryvdh/laravel-dompdf v0.8.0的安装请求 - >可由barryvdh/laravel-dompdf [v0.8.0]满足。 – Karthikvijayaveni
我刚刚测试了一个全新的laravel安装过程,它工作得很好。你在使用最新的作曲家版本(1.3.2)吗? – Plxx
Composer版本是1.3.0。如何升级作曲家版本。@Plxx – Karthikvijayaveni