PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 2, 2022

[FIXED] Clone a Laravel project but can't run

 January 02, 2022     composer-php, laravel-8, laravel-upgrade, php     No comments   

Issue

After cloning a project and run the command composer install, it shows these errors.

Your lock file does not contain a compatible set of packages. Please run composer update.

Problem 1 - cache/adapter-common is locked to version 0.4.0 and an update of this package was not requested. - cache/adapter-common 0.4.0 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 2 - cache/filesystem-adapter is locked to version 0.4.0 and an update of this package was not requested. - cache/filesystem-adapter 0.4.0 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 3 - cache/tag-interop is locked to version 1.0.0 and an update of this package was not requested. - cache/tag-interop 1.0.0 requires php ^5.5 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.

When I update the .env file according to the Laravel doc https://laravel.com/docs/8.x/upgrade#php-7.3.0-required then run a command composer update it shows an error again

Your requirements could not be resolved to an installable set of packages.

Problem 1 - Root composer.json requires php 7.3.0. but your php version (8.0.0) does not satisfy that requirement.
Problem 2 - Root composer.json requires cache/filesystem-adapter ^0.4.0 -> satisfiable by cache/filesystem-adapter[0.4.0]. - cache/filesystem-adapter 0.4.0 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 3 - Root composer.json requires doctrine/dbal 2.9.2 -> satisfiable by doctrine/dbal[v2.9.2]. - doctrine/dbal v2.9.2 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 4 - laravel/passport[v7.2.0, ..., v7.5.1] require guzzlehttp/guzzle ~6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.5] but it conflicts with your root composer.json require (^7.0.1). - Root composer.json requires laravel/passport ^7.2 -> satisfiable by laravel/passport[v7.2.0, ..., v7.5.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

How to update the composer.json for another one also plz help me.


Solution

To resolve this type of the same problem Just upgrade or degrade your PHP versions. Just do the following steps.

  • Clone a project
  • Visit php.net
  • Install the version according to the requirement
  • Set the path of PHP: Goto properties->Advance system settings->Evironment variable->Path


Answered By - Mukhlis Raza
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing