【发布时间】:2016-01-19 14:30:42
【问题描述】:
大家好,当我使用 composer 安装 laravel 框架时,我遇到了两个错误。我该如何解决这个问题?提前致谢!
composer global require "laravel/installer=~1.1"
错误:
[RuntimeException]
Could not load package laravel/framework in http://packagist.org:
[UnexpectedValueException]
Could not parse version constraint ^1.0.4: Invalid version string "^1.0.4"
..
[UnexpectedValueException]
Could not parse version constraint ^1.0.4: Invalid version string "^1.0.4"
**
**Edited :**
composer diagnose
Checking composer.json: FAIL
name : The property name is required
description : The property description is required
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK
**
【问题讨论】:
-
你要安装哪个版本?
-
您是否尝试过他们在手册页上列出的替代方法?您在哪里使用 composer 而不是使用安装程序? composer create-project laravel/laravel test-laravel-5-project --prefer-dist
-
它创建了项目 Andy。但它也给出了同样的错误
-
顺便说一句,如果你想制作多个任何版本的 Laravel 项目,我建议你制作虚拟主机也许值得看看这个链接stackoverflow.com/questions/27754367/…这适用于 Windows 操作系统。