[英]installing laravel via composer InvalidArgumentException
I want to install laravel 4.x and as you know I must use composer. 我想安装laravel 4.x,并且您知道我必须使用composer。
I've tried: 我试过了:
composer create-project laravel/laravel d:\\xampp\\htdocs\\laravel
[InvalidArgumentException]
Could not find package laravel/laravel with stability stable.
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs][--no-install] [package] [directory] [version]
I've downloaded laravel from github repo and then tried this one: 我已经从github repo下载了laravel,然后尝试了一个:
composer install
and this time I got: 这次我得到了:
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package laravel/framework could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
I'm Using: 我正在使用:
Apache 2.4.7
PHP 5.5.6
installed by xampp-win32-1.8.3-1-VC11
on win8 64bit 由xampp-win32-1.8.3-1-VC11
安装在win8 64位上
please help me 请帮我
You forgot to add the "--prefer-dist " . 您忘记添加“ --prefer-dist”。 So in your case, you have to use the: 因此,在您的情况下,您必须使用:
composer create-project laravel/laravel --prefer-dist
in order to make it work. 为了使它工作。 So just remove all the files from: d:\\xampp\\htdocs\\laravel and then try again by following the below commands to your cmd (I guess you are using Windows!): 因此,只需从以下位置删除所有文件:d:\\ xampp \\ htdocs \\ laravel,然后按照以下命令对您的cmd进行重试(我想您正在使用Windows!):
cd d:\xampp\htdocs\laravel
composer create-project laravel/laravel --prefer-dist
I think this should work for you just fine 我认为这应该对您有用
Did you install composer without any errors? 您是否正确安装了作曲器? I think I've got the same error before and the problem was in the composer installation. 我想我之前遇到过同样的错误,问题出在作曲家的安装中。
Finally I found the answer and it was all about the problem between composer and my proxy setting that caused the problem. 最终,我找到了答案,这全都与作曲家和我的代理设置之间的问题有关。
I've explained the problem and solution in composer self-update TransportException 我已经解释了作曲家自我更新TransportException中的问题和解决方案
After that fix composer installed laravel 4 completely and without any problem. 此修复程序完成后,就完全安装了laravel 4,没有任何问题。
Thanks everybody 谢谢大家
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.