3

I want to install laravel 4.x and as you know I must use 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:
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

please help me

Thanks

Morteza Tourani
  • 3,506
  • 5
  • 41
  • 48
  • 1
    Please run `composer diag` and add any findings to your question. Do you have to use any proxies? – Sven Dec 08 '13 at 10:27
  • @Sven here is the result: ` d:\xampp\htdocs\laravel>composer diag Checking platform settings: FAIL The xdebug extension is loaded, this can slow down Composer a little. Disabling it when using Composer is recommended, but should not cause issues beyond slowness. Checking http connectivity: OK Checking composer.json: OK Checking disk free space: OK Checking composer version: FAIL Your are not running the latest version` – Morteza Tourani Dec 08 '13 at 13:36

3 Answers3

4

You forgot to add the "--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!):

cd d:\xampp\htdocs\laravel
composer create-project laravel/laravel --prefer-dist

I think this should work for you just fine

John Skoumbourdis
  • 3,041
  • 28
  • 34
3

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

After that fix composer installed laravel 4 completely and without any problem.

Thanks everybody

Community
  • 1
  • 1
Morteza Tourani
  • 3,506
  • 5
  • 41
  • 48
1

Did you install composer without any errors? I think I've got the same error before and the problem was in the composer installation.

John Skoumbourdis
  • 3,041
  • 28
  • 34
Dora
  • 6,776
  • 14
  • 51
  • 99
  • I've installed this via composer setup and it doesn't show any problem but as I asked [here](http://stackoverflow.com/questions/20448896/composer-self-update-transportexception) there is a problem in downloading (or checking for) update – Morteza Tourani Dec 08 '13 at 04:17