大家试试 Composer 全量国内镜像吧
本镜像经过重新开发不再依赖老外开发的 toran 系统了,并且已于 15 年 7月份重装上阵!请参考这篇帖子: http://wenda.golaravel.com/question/1508
Composer 国内全量镜像
Toran 是 Composer 和 Packagist 的作者开发的私有发布、镜像工具,6月份的时候发布的,当时我们就搭建了一套作为 Composer 的私有镜像内部使用,它能同时缓存 package.json 和压缩包数据,其实就是一个完整的 Packagist 服务,composer install 的时候全部走国内流量,速度飞快。镜像地址和使用方法在这里:http://pkg.phpcomposer.com/
另外,创建 Laravel 项目的时候强烈推荐使用 composer 方式,即:
composer create-project laravel/laravel project-name --prefer-dist
再加上我们的镜像的加速,整个创建项目、安装依赖包的过程非常快速、流畅。
为什么不用 laravel/installer ?
laravel/installer 工具在创建项目的时候需要从 laravel 官网(国外)下载 laravel.zip
压缩包,速度慢、随时可能被墙,而且下载地址是写死到 installer 工具中的,不能配置,使用的时候出问题无法解决。
66 个回复
FiveSay - 成武
赞同来自: kehao
FiveSay - 成武
赞同来自: kehao
golaravel
赞同来自: kehao
Command: composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
[Composer\Downloader\TransportException]
The "http://pkg.phpcomposer.com/rep ... n-app
lication.json" file could not be downloaded (HTTP/1.1 500 Internal Server E
rror)
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-p
lugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--ver
bose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
D:\WWW\ZendSkeletonApplication-master>
lifesign
赞同来自: kehao
糖古屋
赞同来自: kehao
David
赞同来自: kehao
David
赞同来自: kehao
star001007
赞同来自: kehao
summer - Creator of http://phphub.org
赞同来自: kehao
王赛
赞同来自: kehao
Chris
赞同来自: __缘来如此
The "http://pkg.phpcomposer.com/rep ... ot%3B file could no
t be downloaded (HTTP/1.1 502 Bad Gateway)
之前还能用,是不是服务器出问题了?
星枫
赞同来自: 安正超
The "http://pkg.phpcomposer.com/rep ... ot%3B file could not be downloaded (HTTP/1.1 502 Bad Gateway)
@王赛,又502啦,看看肿么了。。。
steptn
赞同来自: yunbookf
我这和你的问题一样。
@王赛
什么时候可以恢复?
wormcc
赞同来自:
summer - Creator of http://phphub.org
赞同来自:
http://pkg.phpcomposer.com/app.php/settings
or_and_or
赞同来自:
Composer.json 这个是不是全局或项目配置一个就可以了?
我全局配完了,执行composer install --prefer-dist,报错了。
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/s ... ot%3B file could not
be downloaded: failed to open stream: Connection timed out
joshle
赞同来自:
The "http://pkg.phpcomposer.com/rep ... ot%3B file could not be downloaded (HTTP/1.1 404 Not Found)
提示404错误
kehao
赞同来自:
安正超
赞同来自:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package illuminate/database could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/to ... ussion> for more details.
Read <http://getcomposer.org/doc/art ... ing.md> for further common problems.
```
@王赛
wsmdr
赞同来自:
[UnexpectedValueException]
Invalid url given for Composer repository: http://{{ url('toran_proxy_base', {repo: 'packagist'}) }}
__缘来如此
赞同来自:
502 Bad Gateway
nginx/1.4.6 (Ubuntu)
quhuan
赞同来自:
The "http://pkg.phpcomposer.com/rep ... ot%3B file could no
t be downloaded (HTTP/1.1 502 Bad Gateway)
lifesign
赞同来自:
而且文档中
{"type": "composer", "url": "{{ url('toran_proxy_base', {repo: 'packagist'}) }}"},
这个写法怎么像laravel的blade 但是composer应该不识别的吧
王赛
赞同来自:
上述错误。现在已经修改过来了。请大家多试一试,欢迎吐槽
安正超
赞同来自:
lifesign
赞同来自:
atan
赞同来自:
王赛
赞同来自:
这次重启了一下toranproxy服务应该就ok了。
感谢各位及时提醒 :)
yunbookf
赞同来自:
hick - My Site: www.WebRube.com
赞同来自:
yunbookf
赞同来自:
昨天正常,今天就空白页,安装也提示这个了。
shenopkss
赞同来自:
[Composer\Downloader\TransportException]
The "http://pkg.phpcomposer.com/rep ... ot%3B file could not be downloaded (HTTP/1.1 502 Bad Gateway)
求解决,非常感谢
nice02
赞同来自:
composer install 时出现502
[Composer\Downloader\TransportException]
The "http://pkg.phpcomposer.com/rep ... ot%3B file could not be downloaded (HTTP/1.0 502 Bad Gateway)
hang
赞同来自:
大裤衩子
赞同来自:
xuezhiwen
赞同来自:
wgw335363240
赞同来自:
kaxiu
赞同来自:
[Seld\JsonLint\ParsingException]
"http://pkg.phpcomposer.com/rep ... ot%3B does
not contain valid JSON
Parse error on line 1:
...ler":"self.version",
----------------------^
Expected: 'STRING' - It appears you have an extra trailing comma
报错这样的错误,是镜像里面json的问题吗?还是我的问题呢
suraclisp
赞同来自:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL: crypto enabling timeout
Failed to enable crypto
failed to open stream: operation failed
zhang5zhang5
赞同来自:
@王赛
可以把想在服务器的那个 toranproxy 数据打包成一个压缩文件传 百度云盘共享下么?
没办法自己才架设了一个,这个国内镜像 502 得有点频繁
王赛
赞同来自:
目前我们服务器上的数据将近20G,打包共享不太现实。
举个栗子
赞同来自:
Problem 1
- The requested package caralyst/sentry could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/to ... ussion> for more details.
Read <http://getcomposer.org/doc/art ... ing.md> for further common problems.
出现了同楼上一样的错误,配置了《Composer 中国镜像》还是一样的错误,求解啊
@王赛
游水
赞同来自:
N_9527_
赞同来自:
这个地址502了。
ply_test
赞同来自:
PHP环境:5.5.18
composer配置:
{
"config": {},
"repositories": [
{"type": "composer",
"url": "http://pkg.phpcomposer.com/repo/packagist/"
},
{"packagist": false}
]
}
安装时报错:
$ composer create-project laravel/laravel --prefer-dist
[InvalidArgumentException]
Could not find package laravel/laravel with stability stable.
jh850869887
赞同来自:
trons
赞同来自:
@王赛
ricoo
赞同来自:
The "http://pkg.phpcomposer.com/rep ... ot%3B file could not be
downloaded (HTTP/1.1 500 Internal Server Error)
500错误
白子玉
赞同来自:
[Composer\Downloader\TransportException]
The "http://pkg.phpcomposer.com/rep ... ot%3B file could not be downloaded (HT
TP/1.1 502 Bad Gateway)
lucups
赞同来自:
twilroad
赞同来自:
yekz
赞同来自:
Zeiy
赞同来自:
IT不倒翁
赞同来自:
lux
赞同来自:
The "http://pkg.phpcomposer.com/rep ... ot%3B file could no
t be downloaded (HTTP/1.1 502 Bad Gateway)
额,一直安装不了。。。
卡萨布兰卡
赞同来自:
萧晔离 - 一个脱离了高级趣味的人。
赞同来自:
dotatata
赞同来自:
[Composer\Downloader\TransportException]
The "http://pkg.phpcomposer.com/rep ... ot%3B file could not be downloaded (HTTP/1.1 502 Bad Gateway)
字研字禹
赞同来自:
XIN
赞同来自:
Reading bower.json of bower-asset/typeahead.js (v0.10.1)
一直卡在这里
"repositories": [
{"type": "composer", "url": "http://packagist.phpcomposer.com"},
{"packagist": false}
],
这个是在项目中的Composer 加的
lianginet
赞同来自:
调调很低
赞同来自:
本镜像共缓存了 97095 个项目(package)、807242 个(zip)安装包。最后同步时间:2016年4月4日星期一中午12点00分 。
a939638621
赞同来自:
ocean海阳
赞同来自:
[Composer\Downloader\TransportException]
Content-Length mismatch
composer update 的时候出现这个错误,我的网络没有问题,为什么别人的很快,我的总是连接不上呢,还有什么会影响么
Yao
赞同来自:
duzhenlin
赞同来自:
https://packagist.phpcomposer.com could not be fully loaded, package information was loaded from the local cache and may be out of date