Friday, December 31, 2021

[FIXED] Could not find package laravel/laravel with version 6 in a version installable using your PHP version 5.6.30

Issue

I’m using mac os and install MAMP 5.7. when I run PHP -v on the terminal it says PHP version is 7.2 but when I try to create Laravel project I got this error. I don’t know why the composer recognizes that the PHP version in 5.6

this is the error


Solution

Please check the following this may fix the problem

  1. check the alias given to composer to point to appropriate version
  2. try uninstalling or upgrading your Mammp or your verserver and remove cache data.
  3. if you change php version in command line. check it after restart of your PC


Answered By - Ali Mashl

No comments:

Post a Comment

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