Error installing Laravel: Package not available in stable version

Asked

Viewed 238 times

2

I’m strictly following the indicated in the Laravel documentation to make your installation:

composer global require "laravel/installer=~1.1"

However, after a long delay comes the following return:

Changed current directory to (...)/AppData/Roaming/Composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package lavarel/installer 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.

Installation failed, reverting ./composer.json to its original content.

What I might be doing wrong?

  • I managed to download the package here. It was not a punctual problem?

  • Punctual problem two days ago. I imagine it might be some network restriction then. Have some Composer command that tracks or shows the installation log?

  • Use the argument --verbose to view the progress log

  • Make sure everything is all right with the command: composer diagnose

  • composer diagnose said that everything is ok. Already with the --verbose remained exactly the same return... :(

  • 2

    I tried it here and it worked fine! Try to install it the other way (that’s how I usually do it): composer create-project laravel/laravel --prefer-dist

  • @Ricardocruz, it was precisely what I did and solved the question, now what causes the error in the first option remains a mystery.

Show 2 more comments

2 answers

0

Take a look at your config.json ( usually in ~/.Composer/config.json ) and make sure you don’t have ( or had - more than a month ago ) a parameter excluding packagist from the list of Positorios.

"repositories": [
    {
        "packagist": false
    }
]

By placing this parameter in mine, I was able to reproduce its error. Removing it installed normally.

0

I couldn’t reproduce your problem here. The command worked perfectly. Try the following steps:

Update your Composer

composer self-update

Install the package again, but with a more relaxed version rule

composer global require 'laravel/installer=1.*'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.