2018-10-25 18:11:05 2101次浏览 2条回答 0 悬赏 10 金钱

我在xampp安装yii2的时候,总是报错SSL的错,不知道有那位同学遇到过相同的问题

=====
C:\xampp_vc11\htdocs>composer create-project --prefer-dist yiisoft/yii2-app-basic vola
Installing yiisoft/yii2-app-basic (2.0.14)

  • Installing yiisoft/yii2-app-basic (2.0.14): Downloading (failed)
    Downloading (failed)
    Downloading (failed) Failed to download yiisoft/yii2-app-basic from dist: The "https://api.github.com/repos/yiisoft/yii2-app-basic/zipball/dfd0a02b50e0dd96051051bde9251258bda3fd68" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
    error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
    Failed to enable crypto
    failed to open stream: operation failed
    Now trying to download from source
  • Installing yiisoft/yii2-app-basic (2.0.14): Cloning dfd0a02b50

[RuntimeException]
Failed to clone https://github.com/yiisoft/yii2-app-basic.git, git was not found, check that it is installed and in your PATH env.

'git' 不是內部或外部命令、可執行的程式或批次檔。

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []

====

  • 回答于 2018-10-25 23:16 举报

    开扩展,下个ca证书配置一哈,git安装一下,搞定,我的composer就是这么解决的

  • 回答于 2018-10-26 10:04 举报

    php.ini里要把openssl扩展打开

    1 条回复
    回复于 2018-10-26 14:04 回复

    我是重装了PHP5.6,然后把php.ini的extension=php_openssl.dll注释掉,就解决了这个问题。旧的PHP版本太低了。

您需要登录后才可以回答。登录 | 立即注册
kingsun
助理

kingsun

注册时间:2017-10-10
最后登录:2019-01-05
在线时长:2小时51分
  • 粉丝0
  • 金钱15
  • 威望10
  • 积分135

热门问题