我想安装laravel 4.x,正如您所知,我必须使用composer
我尝试过:composer create-project laravel/laravel d:xampphtdocslaravel
[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]
我已经从github repo下载了laravel,然后尝试了这个:composer install
这次我得到了:
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.
我正在使用:
Apache 2.4.7
PHP 5.5.6
由xampp-win32-1.8.3-1-VC11
安装在win8 64位上
请帮我
谢谢
您忘记添加"--preferred dist".所以在您的情况下,您必须使用:
composer create-project laravel/laravel --prefer-dist
以便使其发挥作用。因此,只需从d:\examplep\htdocs\laravel中删除所有文件,然后按照以下命令对cmd重试(我猜您使用的是Windows!):
cd d:xampphtdocslaravel
composer create-project laravel/laravel --prefer-dist
我认为这对你来说应该很好
最后我找到了答案,这一切都是关于composer和我的代理设置之间的问题,导致了这个问题。
我已经解释了composer自更新TransportException 中的问题和解决方案
在修复之后,composer完全安装了laravel 4,没有任何问题。
感谢大家
您安装composer时没有任何错误吗?我想我以前也遇到过同样的错误,问题出在作曲家的安装上。