Homebrew PHP appears not to be linked. - Valet [duplicate]
Asked Answered
S

6

20

I had a problem which appeared all of the sudden saying: Unable to determine linked PHP. which I could not solve so I uninstalled valet, php and dependencies. Then I installed fresh php7.1 but when I run valet install I get quiet slightly similar error: Homebrew PHP appears not to be linked.

Stefaniastefanie answered 30/4, 2019 at 8:57 Comment(4)
@ValentinKnyazev there is plenty of topics about question you posted. It is not my caseStefaniastefanie
Homebrew can't find the correct PHP version, have you linked them up properly? brew link php71Jangro
@WouterVanDamme thank you. That was it. I tried it dozen times before but it did not have effect, now it did :D It was never needed to link it explicitlyStefaniastefanie
@Paul Well the answer with big green check icon does:)Stefaniastefanie
J
12

Homebrew can't find the correct PHP version, have you linked them up properly?

brew link php71

Jangro answered 30/4, 2019 at 10:45 Comment(0)
E
38

First, find the PHP version installed via.

brew list

In my case it was [email protected], then

brew link [email protected] --force --overwrite

and finally

valet install

:)

Epsilon answered 28/12, 2019 at 10:1 Comment(0)
J
12

Homebrew can't find the correct PHP version, have you linked them up properly?

brew link php71

Jangro answered 30/4, 2019 at 10:45 Comment(0)
J
5

brew link [email protected] --force --overwrite

That will push this--

If you need to have this software first in your PATH instead consider running: echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.bash_profile

I ran both independently then tried valet install (worked like a charm).

Jezabelle answered 29/11, 2019 at 3:54 Comment(0)
P
2
brew install [email protected]

then link it

brew link [email protected] --force --overwrite
Putamen answered 12/10, 2019 at 10:34 Comment(0)
G
0
$ brew unlink php && brew link --force [email protected]
Goggler answered 13/4, 2021 at 8:26 Comment(1)
Please, add an explanation. See how to answer.Benzophenone
M
0

If you are coming here following a migration from Intel to M1 and having Valet not use the php cask from the /opt/ folder, this did the trick for me:

echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc.

Mammy answered 24/1, 2023 at 17:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.