php composer全局安装,composer全局安装lavarel时的问题

系统是centos6.5

[root@memda www]# composer global require "laravel/installer=~1.1"

Changed current directory to /root/.composer

./composer.json has been created

Loading composer repositories with package information

Updating dependencies (including require-dev)

- Installing symfony/process (v3.1.3)

Downloading: Failed

Downloading: Failed

Downloading: Failed

Failed to download symfony/process from dist: The "https://api.github.com/repos/symfony/process/zipball/04c2dfaae4ec56a5c677b0c69fac34637d815758" file could not be downloaded: failed to open stream: No route to host

Now trying to download from source

- Installing symfony/process (v3.1.3)

Cloning 04c2dfaae4ec56a5c677b0c69fac34637d815758

Installation failed, deleting ./composer.json.

The disk hosting /root/.composer is full, this may be the cause of the following exception

[RuntimeException]

Failed to clone https://github.com/symfony/process.git via https, ssh protocols, aborting.

- https://github.com/symfony/process.git

error: Failed connect to github.com:443; Operation now in progress while accessing https://github.com/symfony/process.git/info/refs

fatal: HTTP request failed

- git@github.com:symfony/process.git

ssh: connect to host github.com port 22: No route to host

fatal: The remote end hung up unexpectedly

require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...

总是会出现symfony/process下载失败的过程,而且完全查不到原因呀,哭哭哭哭……

回复内容:

系统是centos6.5[root@memda www]# composer global require "laravel/installer=~1.1"

Changed current directory to /root/.composer

./composer.json has been created

Loading composer repositories with package information

Updating dependencies (including require-dev)

- Installing symfony/process (v3.1.3)

Downloading: Failed

Downloading: Failed

Downloading: Failed

Failed to download symfony/process from dist: The "https://api.github.com/repos/symfony/process/zipball/04c2dfaae4ec56a5c677b0c69fac34637d815758" file could not be downloaded: failed to open stream: No route to host

Now trying to download from source

- Installing symfony/process (v3.1.3)

Cloning 04c2dfaae4ec56a5c677b0c69fac34637d815758

Installation failed, deleting ./composer.json.

The disk hosting /root/.composer is full, this may be the cause of the following exception

[RuntimeException]

Failed to clone https://github.com/symfony/process.git via https, ssh protocols, aborting.

- https://github.com/symfony/process.git

error: Failed connect to github.com:443; Operation now in progress while accessing https://github.com/symfony/process.git/info/refs

fatal: HTTP request failed

- git@github.com:symfony/process.git

ssh: connect to host github.com port 22: No route to host

fatal: The remote end hung up unexpectedly

require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...

总是会出现symfony/process下载失败的过程,而且完全查不到原因呀,哭哭哭哭……

自己解决,忘记修改composer的全局配置了,镜像还是要使用国内的镜像,

composer config -g repo.packagist composer https://packagist.phpcomposer...

好蠢!

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值