简体   繁体   中英

Laravel framework install failed on xampp

Hi guys when I install laravel framework with composer I have two errors. How can I solve this? Thanks in advance !

composer global require "laravel/installer=~1.1"

Errors :

 [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

**

Use below command to install a new laravel project of a specific version

composer create-project laravel/laravel your_project_name 4.2.* 

here 4.2.* is the version

Edit:

Update your composer.

You can use below command:

composer self-update

and then create project like this:

composer create-project laravel/laravel {you-project-name} 4.2 --prefer-dist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM