zoukankan      html  css  js  c++  java
  • ComposerDownloaderTransportException ... Failed to enable crypto,failed to open stream: operation failed

    failed to open stream: operation failed


    错误详细信息:

    [ComposerDownloaderTransportException] 
    The "https://packagist.laravel-china.org/packages.json" file could not be downloaded: Peer certificate CN=`*.phphub.org' did not match expected CN=`packagist.laravel-china.org'
    Failed to enable crypto 
    failed to open stream: operation failed
    [ComposerDownloaderTransportException]
      Content-Length mismatch, received 3444 bytes out of the expected 299952

    错误发生情境:

      使用 composer require 命令下载软件时。

    解决办法:

      (1)更换composer镜像源,可以执行尝试以下几种:

        更换成阿里镜像:composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

        更换成Laravel China镜像: composer config -g repo.packagist composer https://packagist.laravel-china.org

        更换成中国全量镜像:composer config -g repo.packagist composer https://packagist.phpcomposer.com

      (2)如果更换镜像,还不能下载成功,可能是网络有问题:

          1、(虚拟机环境)可以尝试把静态ip更换为动态获取,桥接改为网络地址转换。

          2、通过ftp或文件共享方式下载然后上传。


     

        

  • 相关阅读:
    Mybatis学习笔记
    Java——设计模式
    Java——多线程
    Java——集合
    DAO层、Service层、Controller层、View层
    Mybatis整合spring
    Spring中的DI和IOC
    事务
    Xml实现AOP
    2018.3.10考试的试题解析
  • 原文地址:https://www.cnblogs.com/gyfluck/p/11275277.html
Copyright © 2011-2022 走看看