请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

安装失败,怎么解决????


[root@localhost ~]# composer create-project --prefer-dist yiisoft/yii2-app-basic basic 2.0.7

Installing yiisoft/yii2-app-basic (2.0.7)

  - Installing yiisoft/yii2-app-basic (2.0.7): Downloading (100%)         

Created project in basic

Loading composer repositories with package information

Updating dependencies (including require-dev)

                                                                                                                           [Composer\Repository\InvalidRepositoryException]                                                                                    

 No valid bower.json was found in any branch or tag of https://github.com/jquery/jquery-dist.git, could not load a package from it. 

正在回答 回答被采纳积分+3

4回答

Jason 2017-06-01 16:20:30

仔细看了下,应该还是你的网络问题,多试试,不行的话重新安装composer试试

0 回复 有任何疑惑可以回复我~
提问者 加菲3721 2017-06-01 11:16:47

[root@localhost ~]# composer create-project --prefer-dist yiisoft/yii2-app-basic basic

The "https://packagist.phpcomposer.com/packages.json" file could not be downloaded: failed to open stream: Connection timed out

https://packagist.phpcomposer.com could not be fully loaded, package information was loaded from the local cache and may be out of date

Installing yiisoft/yii2-app-basic (2.0.11)

  - Installing yiisoft/yii2-app-basic (2.0.11): Loading from cache

Created project in basic

Loading composer repositories with package information

The "https://packagist.phpcomposer.com/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known

failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

https://packagist.phpcomposer.com could not be fully loaded, package information was loaded from the local cache and may be out of date

Updating dependencies (including require-dev)

                                                                                                                                                                                             

  [Composer\Repository\InvalidRepositoryException]                                                                                      

  No valid bower.json was found in any branch or tag of https://github.com/twitter/typeahead.js.git, could not load a package from it. 


0 回复 有任何疑惑可以回复我~
提问者 加菲3721 2017-06-01 11:08:31

按照这个步骤做了还是不行呀,晕。。。。

[root@localhost ~]# composer global require "fxp/composer-asset-plugin:1.3.1"       安装插件

[root@localhost ~]# composer config -g repo.packagist composer https://packagist.phpcomposer.com   使用国内源

[root@localhost ~]# composer create-project --prefer-dist yiisoft/yii2-app-basic basic   安装基础版


0 回复 有任何疑惑可以回复我~
Jason 2017-05-31 23:11:43

把composer切换到大陆源试试,参考phpcomposer.com

0 回复 有任何疑惑可以回复我~
  • 提问者 加菲3721 #1
    composer安装总是失败,改为用归档文件安装可以吗?
    Nginx虚拟主机配置文档,项目的源代码,麻烦老师发我一份,我邮箱zh_jd@163.com
    回复 有任何疑惑可以回复我~ 2017-06-01 14:10:32
  • Jason 回复 提问者 加菲3721 #2
    项目源代码,https://github.com/BestJason/imooc_shop
    
    配置文件回去给你发
    回复 有任何疑惑可以回复我~ 2017-06-01 16:21:29
  • Jason 回复 提问者 加菲3721 #3
    已发送
    回复 有任何疑惑可以回复我~ 2017-06-02 10:21:26
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信