Laravel New Installation – Removing PHP 7.1.23 from Mac without Brew-ThrowExceptions

Exception or error:

I’ve got a new laravel project
When I run php artisan serve
it shows:

MacBook-Pro% php artisan serve

Warning: require(/Users/username/Desktop/code/argon/vendor/autoload.php): failed to open stream: No such file or directory in /Users/username/Desktop/code/argon/artisan on line 18

Fatal error: require(): Failed opening required '/Users/username/Desktop/code/argon/vendor/autoload.php' (include_path='.:') in /Users/username/Desktop/code/argon/artisan on line 18

composer update shows

MacBook-Pro% composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php ^7.2.5 but your PHP version (7.1.23) does not satisfy that requirement.
  Problem 2
    - laravel/tinker v2.2.0 requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - laravel/tinker v2.1.0 requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - laravel/tinker v2.0.0 requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - laravel/tinker 2.x-dev requires php ^7.2 -> your PHP version (7.1.23) does not satisfy that requirement.
    - Installation request for laravel/tinker ^2.0 -> satisfiable by laravel/tinker[2.x-dev, v2.0.0, v2.1.0, v2.2.0].



MacBook-Pro% php -v
PHP 7.1.23 (cli) (built: Nov  7 2018 18:20:35) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

also

MacBook-Pro% brew unlink php@7.1
Error: No such keg: /usr/local/Cellar/php@7.1
MacBook-Pro% brew unlink php71
Error: No such keg: /usr/local/Cellar/php71

also

MacBook-Pro% which php
/usr/bin/php

Any ideas how to remove php 7.1.23 ?

How to solve:

Found a solution !

brew install php72
brew switch php@7.2 7.2.25

https://laravel.com/docs/6.x/homestead

Leave a Reply

Your email address will not be published. Required fields are marked *