通常我会通过以下有关文档的命令来安装Laravel 5.1:
Normally I do install Laravel 5.1 by following this command regarding to documentation:
composer create-project laravel/laravel --prefer-dist它工作正常.
但是我阅读了通过Laravel安装程序"下的文档通过Laravel安装程序安装 ,它比通过Composer安装的速度快得多:
But I read in the documentation under "Via Laravel Installer" also it is possible to install via Laravel Installer, which is much faster than installing via Composer:
laravel new blog但是要使用此方法,我需要运行以下命令一次:
But to use this method I need to run following command once:
composer global require "laravel/installer=~1.1"当我运行它时,我会多次出现以下错误
When I do run it I get following errors many times
弃用通知:Composer \ Package \ Version \ VersionParser :: parseLinks 不推荐使用.使用\ Composer \ Package \ Loader \ ArrayLoader :: parseLinks() 代替在 phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:226
Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks() instead in phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:226
在出现多行相同错误./composer.json has been updated后,它继续出现同一行错误,并以以下一行结束
after many line of same error ./composer.json has been updated appears and it continues with the same line of errors, it ends with following
使用软件包信息加载composer存储库更新 依赖项(包括require-dev)无需安装或更新 生成自动加载文件
Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files
这有什么问题?任何想法或解决方案.
What is wrong with it? Any idea or solution.
我的环境:Windows 10,GitBash和cmder控制台.
My environment: Windows 10, GitBash and cmder console.
作曲家的更新,我也跑了composer self-update
Update of composer, I did ran composer self-update also
控制台快照
请注意,在解决问题后,我可以确认通过Laravel Installer方法进行的安装比composer更快.
Note, I can confirm after solving the issue that the installation via Laravel Installer method is faster than composer.
推荐答案您在本地安装的Composer Assets插件使用的Composer方法已弃用.该插件已经修复,因此请运行composer global update以获得具有错误修复程序的最新版本.之后,您应该能够成功运行该命令.
The Composer Assets Plugin you've installed locally is using a deprecated method of Composer. The plugin is already fixed, so run composer global update to get the latest versions with the bug fix. After it, you should be able to run the command succesfully.
如果这不起作用(因为运行上一个命令可能会遇到相同的错误),请尝试删除全局供应商目录.运行任何全局Composer命令时,它会输出类似将当前目录更改为XXX"的内容.删除XXX/vendor目录,然后尝试运行命令.
If this doesn't work (as you might get the same error running the previous command), try removing the global vendor directory. When running any global Composer command, it outputs something like "Changed current directory to XXX". Remove the XXX/vendor directory and then try running the command.
更多推荐
Laravel安装程序方法
发布评论