Solution: I’ve updated my OS to the latest version where the latest PHP was supported.
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 [email protected]
Error: No such keg: /usr/local/Cellar/[email protected]
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 ?
2
Answers
Found a solution !
https://laravel.com/docs/6.x/homestead
php -v gives the following response:
Info here
In short: macOS continues to include ‘legacy’ versions of things like Python, Ruby, Perl, and indeed PHP, so that existing code won’t break, but Apple is leaving it to the user to install the versions that they want to use.