0

I am geeting error when trying to install laravel 7 using php version 8. Is there any way i can solve this issue.

enter image description here

2
  • 2
    There is, but you should not. There is a reason the install is blocked. Some functionality will not work. Why don't you just install the latest version of Laravel. Commented Sep 21, 2021 at 13:20
  • 1
    • Welcome to StackOverflow! Please avoid uploading code as an image. meta.stackoverflow.com/questions/285551/… Commented Sep 22, 2021 at 13:35

1 Answer 1

5

This message is telling you that no version of Laravel is available for the given version constraint (^7.0) and your PHP version.

Said otherwise all Laravel version from the 7.0 to the latest 7.x (^7.0) aren't compatible with your PHP version (which is probably too old).

You could also have missing extensions that are required by Laravel.

Three options here:

  • You try to fix those version problems and try again.
  • You bypass Composer checks by using the --ignore-platform-reqs flag: composer create-project --ignore-platform-reqs laravel/laravel:^7.0 blog. Composer will ignore the "platform requirements" and will install Laravel, however it might not work well.
  • You remove the version constraint and Composer will install the latest compatible Laravel version (if there is one, it depends on your extensions): composer create-project laravel/laravel blog.

You can check the PHP version by doing php --version, Laravel 7 requires at least PHP 7.2.

Sign up to request clarification or add additional context in comments.

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.