Morteza Tourani
Morteza Tourani

Reputation: 3536

installing laravel via composer InvalidArgumentException

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

Upvotes: 3

Views: 15505

Answers (1)

John Skoubourdis
John Skoubourdis

Reputation: 3249

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

Upvotes: 4

Related Questions