failed to open stream: operation failed

# composer require oygza/aliyun-php-sdk-afs
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
The "https://packagist.laravel-china.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
https://packagist.laravel-china.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://packagist.laravel-china.org/p/oygza/aliyun-php-sdk-afs%2484478e475ed0310fe4ed736a710a0c529a95de9cf121907160064f7ab527264d.json" file could not be downloaded: SS  
  L operation failed with code 1. OpenSSL Error messages:                                                                                                                        
  error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed                                                                                              
  Failed to enable crypto                                                                                                                                                        
  failed to open stream: operation 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] [--] [<packages>]...

处理办法,更改镜像源为阿里或者其他

# composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

搞定!

# composer require oygza/aliyun-php-sdk-afs
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^1.0 for oygza/aliyun-php-sdk-afs
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing oygza/aliyun-php-sdk-afs (1.0.0): Downloading (100%)         
Writing lock file
Generating autoload files

posted @ 2019-11-30 11:11  TBHacker  阅读(1503)  评论(0编辑  收藏  举报