安装步骤参考链接:
http://laravelacademy.org/post/354.html
安装过程遇到的问题和解决:
提示composer 需要更新
使用composer self-update
但是可能出下面的问题,提示zlib_decode(): data error
,解决办法在php.ini中更改:
zlib.output_compression = On
zlib.output_compression_level = 5
再次更新
F:\wamp7\wamp64\www>composer self-update
Updating to version fb6f6fd26c39b385a6feb087ff39238bc3ce67b2.
Downloading: Connecting...
[ErrorException]
zlib_decode(): data error
self-update [-r|--rollback] [--clean-backups] [--no-progress] [version]
F:> composer self-update
Updating to version fb6f6fd26c39b385a6feb087ff39238bc3ce67b2.
Downloading: 100%
Use composer self-update --rollback to return to version bc45d9185513575434021527d7756420e9f4b2cf
使用composer安装时,被墙
F:\wamp7\wamp64\www>composer global require "laravel/homestead=~2.0"
Changed current directory to C:/Users/Administrator/AppData/Roaming/Composer
./composer.json has been updated
Loading composer repositories with package information
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: 由于连 接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)
Installation failed, reverting ./composer.json to its original content.
[Composer\Downloader\TransportException]
The "http://packagist.org/p/laravel/homestead%246aae82af033f554361fee10b690
e9758a21d5cb85821f499c77456b0a55d5a61.json" file could not be downloaded: f
ailed to open stream: 由于连接方在一段时间后没有正确答复或连接的主机没有反应
解决办法
添加国内镜像,然后在执行上次命令,速度飞快
参考链接:http://pkg.phpcomposer.com/
composer config -g repo.packagist composer https://packagist.phpcomposer.com