Heim  >  Fragen und Antworten  >  Hauptteil

php - composer更新国内镜像后安装三方包时提示错误

之前用默认的composer配置,安装了laravel,现在切换会国内镜像,安装一个三方包,就提示这个

[Composer\Downloader\TransportException]                                                                             
  The "https://packagist.phpcomposer.com/packages.json" file could not be downloaded: Peer certificate CN=`*.b0.upaiy  
  un.com' did not match expected CN=`packagist.phpcomposer.com'                                                        
  Failed to enable crypto                                                                                              
  failed to open stream: operation failed 

网上的解决方案都不行,我尝试多次,总有这个错误,也在该加的地方加了

"repositories": {
        "packagist": {
            "type": "composer",
            "url": "https://packagist.phpcomposer.com"
        }
    }

是不是证书问题,我需要到哪里修改呢?

ringa_leeringa_lee2683 Tage vor505

Antworte allen(3)Ich werde antworten

  • 迷茫

    迷茫2017-05-16 13:13:58

    始终未能解决,放弃了国内包,通过linux虚拟机samba共享目录,然后windows下cd到该目录,用windows下的composer代替的安装了扩展包,蛮顺利而且蛮快,依旧是国外镜像,默认配置。可能大概由于虚拟机是CentOS5.5,openssl版本过低导致吧(个人猜测),结贴了。。。

    Antwort
    0
  • 習慣沉默

    習慣沉默2017-05-16 13:13:58

    我也遇到这样的问题了,找不到答案,好忧愁。

    Antwort
    0
  • 習慣沉默

    習慣沉默2017-05-16 13:13:58

    OpenSSL配置的问题
    具体看这边

    Antwort
    0
  • StornierenAntwort