简体   繁体   中英

i am try to install laravel 6 pdf package "composer require barryvdh/laravel-dompdf"

在此处输入图片说明

I'm trying composer require barryvdh/laravel-dompdf. But i got:

E:\wamp64\www\laravel\Bugler>composer require barryvdh/laravel-dompdf
You are running Composer with SSL/TLS protection disabled.
The "https://repo.packagist.org/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
https://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

[Composer\Downloader\TransportException]
  The "https://repo.packagist.org/p/barryvdh/laravel-dompdf%24121356f3b13be1ea852a1b1d7ee643fe8af75206dd35d9e62998d63
  5a75f929c.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known.
  failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

can any one help me? I also try to resolve this.

php artisan cache:clear

php artisan config:cache

Delete your composer.lock file in your project directory and run below command:

composer install

Or you can try to run below command:

composer require barryvdh/laravel-dompdf:0.8.2 

Similar issue is already listed on Composer github repository

This issue occurs due to incorrect proxy configuration. Check your proxy configuration .

Also if you are using any antivirus then disable it and try again

https://github.com/composer/composer/issues/6891

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