Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SarahS's avatar
Level 12

Updating to php 7.3

I'm following along the new Laravel 6 series and trying to install Valet.

First I need to install php 7.3 which apparently I have but it is not linked.

In Brew.php line 204:
                                          
  Homebrew PHP appears not to be linked.  

so I ran:

brew link php73

and it said:

Error: No such keg: /usr/local/Cellar/php73

I'm not sure what I need to do now, can anyone help?

0 likes
20 replies
mstrauss's avatar

Try running brew info php73 and see what is returned.

AntLusher's avatar

Use homestead. Then you won't need to worry about your local environment

mstrauss's avatar

@antlusher

Laravel valet is amazing, and the setup is typically pretty straight forward. I suggest @sarahs74 keeps trying as it is worth it.

SarahS's avatar
Level 12

@mstrauss

This is what I get:

Error: No available formula with the name "php73" 
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
mstrauss's avatar

Okay, so maybe try the same thing with php72, php71,... until you find the version that is available in your brew setup. And if you need a newer version to run Valet, you can install and link that version with homebrew quite easily.

SarahS's avatar
Level 12

I'm supposed to have 7.3 but it is the linking that is the issue.

SarahS's avatar
Level 12

How can I find out what is already linked?

SarahS's avatar
Level 12

When I did this:

brew unlink php && brew link php

I got:

Unlinking /usr/local/Cellar/php/7.3.9_1... 0 symlinks removed
Linking /usr/local/Cellar/php/7.3.9_1... 
Error: Could not symlink sbin/php-fpm
/usr/local/sbin is not writable.
benyamin001's avatar

I think you must update brew with :

brew update

and then

brew upgrade php
SarahS's avatar
Level 12

I still get:

Error: No such keg: /usr/local/Cellar/php73
benyamin001's avatar

after

brew upgrade php

,your default php upgrade just check

php -v 
AntLusher's avatar

I had the exact issues with Moj - so I used Homestead instead. Doing so will keep things all wrapped together in a little VM.

I love running native, but sometimes you can mess up your host envrionment

SarahS's avatar
Level 12

I think I'll just skip past this part of the tutorial and move on.

1 like
Griehle's avatar

For me the

 brew unlink php && brew link php
 brew services restart --all
 composer global update
 valet start

worked like a charm when upgrading from 7.2 to 7.3 and restarting valet. Which imho is a much better setup than using homestead,do not follow that advice to abandon it.

amarchauhan's avatar

im still getting a

502 Bad Gateway nginx/1.19.1

error, not sure what is going on , ive tried everything but nothing seems to work. almost tempted to reboot my mac to see if that fixes it. hope someone can help

Please or to participate in this conversation.