Asjath Husni
Asjath Husni

Reputation: 3

Error in Laravel Installation

I already installed laravel with composer create-project, when i deleted the old installation directory and reinstalled it. Second time it throw an error like this: [Composer\Repository\RepositorySecurityException] The contents of http://packagist.org/p/doctrine/dbal$d904339843d0d66d194f72 4e7543073f5fb46ee97d2852bdc0ae96f2cd5cba38.json do not match its signature. This should indicate a man-in-the-middle attack. Try running composer again and report this if you think it is a mistake.

Can anybody help me with this error. I am not a master in composer.

Upvotes: 0

Views: 560

Answers (2)

Bhupesh Shrestha
Bhupesh Shrestha

Reputation: 248

Update the composer to the latest version by running

composer self-update

This solved my issue.

Upvotes: 0

James
James

Reputation: 16339

You may find this article quite helpful for solving your issue.

To quote the article:

When you run the command for downloading laravel installer, the command creates a composer.json file in \Users(XXX)\AppData\Roaming\Composer path. It loads laravel/installer but fails to load Packagist repository (Which is responsible for downloading all laravel dependency modules ).

This error occures when composer do not find packagist repository.

To fix the issue you just need to add the below code in to the composer.json file:

"repositories": {
"packagist": { "url": "https://packagist.org", "type": "composer" }
}

You can find the path for the composer.json file as part of the error you get in your terminal window.

Upvotes: 1

Related Questions