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

来源:2-1 yii框架的安装

加菲3721

2017-05-31


[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. 

写回答

4回答

Jason

2017-06-01

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

0
0

加菲3721

提问者

2017-06-01

[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
0

加菲3721

提问者

2017-06-01

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

[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
0

Jason

2017-05-31

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

0
7
Jason
回复
加菲3721
用归档文件可以,lnmp应该是你没有设置虚拟机或者权限不对,你设置lnmp vhost add了吗
2017-06-02
共7条回复

Yii2.0开发一个仿京东商城平台

【毕设】购物、下单、支付、收货...各功能模块开发,打造京东式电商平台

1543 学习 · 655 问题

查看课程