I got an error.
$ valet install
[DomainException]
Unable to determine linked PHP.
install
'which' command returns:
$ which php
/usr/local/Cellar/php70/7.0.6/bin/php
I got an error.
$ valet install
[DomainException]
Unable to determine linked PHP.
install
'which' command returns:
$ which php
/usr/local/Cellar/php70/7.0.6/bin/php
Homebrew creates (or attempts to create) symlinks in /usr/local/bin
.
Start by running the following to attempt to create a link.
brew link php70
It'll give you information as to whether or not it was successful. Occasionally permissions are problematic and you can resolve this with
sudo chown -R `whoami`:admin /usr/local/bin
Then try running the brew link command again.
Alternately brew link
may give you instructions, or you can use brew doctor
to get a report on any problems which exist with your Homebrew installation.
When it's set up properly after running ls -la /usr/local/bin | grep bin/php$
you should see something similar to
lrwxr-xr-x 1 YOURUSER admin 29 10 May 21:40 php -> /usr/local/Cellar/php70/7.0.6/bin/php
composer global update
to update the version of Laravel used by Valet. In Valet 2.0.5 there is a change to the way PHP version detection works and it requires a > 5.2 version of Laravel. –
Wnw if your PHP version 7.x and valet > 2.0.8 update valet
valet stop
valet uninstall
brew install php
composer global require laravel/valet
then valet install
I used Homebrew to instal php7.1 , So I ran this command in terminal
ln -s /usr/local/opt/php71/bin/php /usr/local/bin/php
and everything is done.
Homebrew creates (or attempts to create) symlinks in /usr/local/bin
.
Start by running the following to attempt to create a link.
brew link php70
It'll give you information as to whether or not it was successful. Occasionally permissions are problematic and you can resolve this with
sudo chown -R `whoami`:admin /usr/local/bin
Then try running the brew link command again.
Alternately brew link
may give you instructions, or you can use brew doctor
to get a report on any problems which exist with your Homebrew installation.
When it's set up properly after running ls -la /usr/local/bin | grep bin/php$
you should see something similar to
lrwxr-xr-x 1 YOURUSER admin 29 10 May 21:40 php -> /usr/local/Cellar/php70/7.0.6/bin/php
composer global update
to update the version of Laravel used by Valet. In Valet 2.0.5 there is a change to the way PHP version detection works and it requires a > 5.2 version of Laravel. –
Wnw I was going to update Laravel Valet from version 1.* to 2 and ran same error like this
Unable to determine linked PHP
The solution was to run
composer global update
before I ran
valet install
This happens when your brew php gets Updated.
If you do brew install php
this will work but will install php 7.2 by default.
If you want [email protected] you have to do brew install [email protected]
this will install php7.1 and now when you restart valet valet restart
you might get an error. Unable to determine linked PHP.
To make this work with php7.1 you have make brew link
brew link php71
you may have this error
Warning: [email protected] is keg-only and must be linked with
to fix this
brew link --force php71
now valet should work on php7.1
I tried all of the suggestions here—and several from elsewhere—before I hit on the solution. This applies to PHP 7.2 (no guarantee for other versions). If you are using the original Larvel Valet, open the file:
~/.composer/vendor/laravel/valet/cli/Valet/Brew.php
...or, if you're using Valet+
~/.composer/vendor/weprovide/valet-plus/cli/Valet/Brew.php
Locate the supportedPhpVersions
method. In some versions, it will return an array right in the method:
return ['php72', 'php71', 'php70', 'php56'];
Change this to:
return ['7.2', 'php72', 'php71', 'php70', 'php56'];
In other cases, it'll reference const SUPPORTED_PHP_VERSIONS
, and the change will be similar.
Save the file, restart valet, and Bob's your uncle!
valet install
–
Septima I've had the same problem tonight, and here's what I did to get it running:
brew unlink php && brew link php
brew services restart --all
composer global update
valet start
It would be nice if Valet had some suggestions on what to do when "Unable to determine linked PHP." comes up.
© 2022 - 2024 — McMap. All rights reserved.