我有一个项目
const VERSION = '5.1.26 (LTS)'; (inside "vendor/laravel/framework/src/Illuminate/Foundation/Application.php")
我的php和作曲家
% php --version
PHP 7.0.7 (cli) (built: May 25 2016 18:40:26) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
% composer --version
Composer version 1.1.2 2016-05-31 19:48:11
我正在尝试以下列方式安装laravel版本5.1.26 (LTS)
:
composer create-project laravel/laravel my_project 5.1.26
以及
composer create-project laravel/laravel=5.1.26 science --prefer-dist
两者都说同样的错误:
PHP Warning: Uncaught InvalidArgumentException: Could not find package laravel/laravel with version 5.1.26. in phar:///usr/bin/composer/src/Composer/Command/CreateProjectCommand.php:310
如何安装旧版本。
答案 0 :(得分:0)
试试这个
composer create-project laravel/laravel project_name "5.1.*"
答案 1 :(得分:0)
您的参数顺序错误。尝试下面的一个。
composer create-project laravel/laravel sacredindiaapp 5.1.* --prefer-dist
它应该有用。
答案 2 :(得分:0)
试试这个,这对你有用......:)
composer create-project laravel/laravel=5.1 science --prefer-dist