93

When I type laravel new blog I get the following error.

In RequestException.php line 113:

Server error: GET http://cabinet.laravel.com/latest.zip resulted in a 522 Origin Connection Time-out response:

  <html>
  <head><title>522 Origin Connection Time-out</title></head>
  <body bgcolor="white">
  <center><h1>522 Origin Conne (truncated...)

Is the same error if I typ composer create-project --prefer-dist laravel/laravel blog.

And the link doesn't work if I try to go there.

3
  • 3
    You need to update the installer to the latest version. laravel-news.com/updating-the-laravel-installer Commented Nov 4, 2020 at 19:00
  • Thank you now it work. Commented Nov 4, 2020 at 19:03
  • 1
    It's important to be using the latest version of PHP (7.4 right now) or it will try to grab an older version of Laravel, which in turn can't be found because those servers have been shut down. Commented Jan 19, 2021 at 14:44

17 Answers 17

246

Your Laravel installer is very out of date. The only way to get the latest version is to remove and install again:

composer global remove laravel/installer 
composer global require laravel/installer
Sign up to request clarification or add additional context in comments.

3 Comments

For both steps the following red paint followed: Installation failed, reverting ./composer.json and ./composer.lock to their original content.
it worked for me, my laravel was 2.1.6 and it was complaining about GET cabinet.laravel.com/latest.zip 404 not found. Tried various suggestions but no update solved it, finally removing and upgrading to 4.2.10 solved the issues
Something absolutely bizarre to me then is, Laravel's 4.2 quickstart guide has you installing ~1.1, lol. laravel.com/docs/4.2/quick Which will quickly lead you into the territory of OP's question
25
  1. You need to update the installer to the latest version.

laravel-news.com/updating-the-laravel-installer

composer global require "laravel/installer:^4.0"
  1. after update you check your version using: laravel --version and you should get output like Laravel Installer 4.0.3

1 Comment

without removing the existing one and simply executing the command with higher version not helped. Remove the existing older version then fresh install the higher version e.g., 4.2.* helped.
14

try to update laravel/installer globally via:

composer global update laravel/installer

if it didn't work then you can try to remove and install it again:

composer global remove laravel/installer 
composer global require laravel/installer

2 Comments

Updating didn't work for me. I had to uninstall and reinstall.
@Anna if the updating didn't work, you can try to re-install the package.
9

Check your PHP version:

php --version

It has to be >=7.3. If it isn't you have to upgrade your PHP version.

You can download the latest stable version here

Comments

8

Do this:

composer create-project laravel/laravel example-app

if the following fails:

composer global remove laravel/installer 
composer global require laravel/installer

2 Comments

it worked perfect
that sounds great.
8

If none of the above works, try this:

composer create-project --prefer-dist laravel/laravel name of your project

Comments

6

The simplest way to update to the next major version of the installer is via composer require to globally require it:

composer global require "laravel/installer:^4.0"

Worked for me.

Comments

5

The latest Laravel installer will be essential to your workflow which includes support for Jetstream.

The new version also uses composer create-project behind the scenes instead of downloading an archive from Laravel’s build servers.

Update the latest version of laravel/installer with any of the following approaches:

  1. Update to ^4.0 via composer require
composer global require "laravel/installer:^4.0"
  1. Uninstall and Re-install the package via Composer
composer global remove laravel/installer
composer global require laravel/installer
  1. Update the global composer.json file and run composer update
{
    "require": {
        "laravel/installer": "^4.0",
    }  }

composer global update

Verifying the Update

laravel --version

enter image description here

Click here to know more about updating the Laravel Installer

Comments

5

Am putting this issue here it may help somebody. I was using Ubuntu 20.04 and this is my approach.

i installed an older version of laravel using the command below.

composer global require "laravel/installer=~1.1"

this fixed my $PATH

keep in mind that this installs an older version of laravel. After all the above i removed the laravel using the command below

composer global remove laravel/installer

then re-installed it using the command below

composer global require laravel/installer

With all this done you should be running your laravel just fine plus it will be up-to-date.

Comments

3

The workaround of this problem is getting latest version of Laravel Installer as per New Laravel Installer via composer global require "laravel/installer:^4.0"

verify the version using $ laravel -v It should return "Laravel Installer 4.1.0"

Comments

2

If you use laravel homestead, maybe you should update the box itself.

Dont forget to backup your databases.

From the directory where Homestead is installed, run the update command:

vagrant box update
vagrant destroy
vagrant up

For a more detailed description, see: How to update your Laravel Homestead Box

Comments

2

You can run this command for install requirements of laravel installer with laravel installer:

$ composer global require laravel/installer -W

1 Comment

Your answer can be a duplicate. 7 others show the same command as you
1

update your composer in case you have an older version by running this command composer self-update then run this command composer global require laravel/installer to update the laravel installer.
happy coding.

Comments

0

Another issue I was having is that my env variable for Composer\vendor\bin was stored within a windows.old folder and I could not find username/AppData in the normal place. Make sure you show all hidden folders and select the bin folder from the right root folders.

Comments

0

Just try this: It will definitely work

composer create-project laravel/laravel project_name

Comments

0

I had similar problem, and although I had tried this :composer create-project laravel/laravel {directory} 4.2 --prefer-dist

What I realised is that the above command is that it would only temporarily resolve the issue ,with regard specifically to the new project that you have created.But it would not resolve for your other new projects.

The correct commands to resolve your problem completely are these two:- composer global remove laravel/installer composer global require laravel/installer

What I realised is that you can copy-paste the two commands at the same time,but you will need to click enter button after the "remove command " {first command } has finished, so that the second command can run...remember.

After leaving the two to successfully complete, use the command,laravel -v, e.g C:\xampp\php>laravel -v , to check your update version of the laravel installer.You should be able to see something like :Laravel Installer 4.2.8

Thanks to these commands my issue was resolved.

Comments

0

The solution to this error problem is to reinstall the latest laravel installer by those two commands:

composer global remove laravel/installer

composer global require laravel/installer

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.