安装失败,怎么解决????
来源: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试试
00 -
加菲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.
00 -
加菲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 安装基础版
00 -
Jason
2017-05-31
把composer切换到大陆源试试,参考phpcomposer.com
072017-06-02
相似问题