简体   繁体   中英

Installing aws-sdk-php in local machine — http request failed

I am trying to install aws-sdk-php in my local machine using this reference url

When I try -- php composer.phar require aws/aws-sdk-php

It gives me the following error:

[Composer\\Downloader\\TransportException] The " http://packagist.org/p/aws/aws-sdk-php%24a8b264f89dd462e84ffdc6487d616b6126bbc20d00351e8a9daf81c5d66f2305.json " file could not be downloaded: failed to open stream: HTTP request failed!

require [--dev] [--prefer-source] [--prefer-dist] [--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] [--] []...

Any help/hint is highly appreciated. Thanks in advance.

php -r "file_get_contents('http://packagist.org/p/aws/aws-sdk-php%24a8b264f89dd462e84ffdc6487d616b6126bbc20d00351e8a9daf81c5d66f2305.json');" 

try this way

OR

hit this: composer config -g repo.packagist composer https://packagist.org

and try YOUR way again

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