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

undrwd's avatar

Laravel Valet | Uninstalled Valet, Installed Valet 2.0 Unable to determine linked PHP.

I'm getting and "Unable to determine linked PHP" when runing Valet Install. I've followed all the installation instructions in the docs and possible solutions to this issue on StackOverflow and am still getting the error.

Here is some info:

brew list

autoconf jpeg mcrypt pcre readline freetype libpng mhash php70 redis gettext libxml2 nginx php70-mcrypt unixodbc icu4c mariadb openssl php71 wget

php -v

PHP 7.0.4 (cli) (built: Mar 10 2016 14:34:46) ( NTS )

which php

/usr/local/php5-7.0.4-20160310-143636/bin/php

brew link php71

Linking /usr/local/Cellar/php71/7.1.8_20... 17 symlinks created

valet install

Stopping nginx.... Installing nginx configuration... Installing nginx directory... Updating PHP configuration...

[DomainException] Unable to determine linked PHP.

install

valet

Laravel Valet version 2.0.5

Thanks in advance.

0 likes
4 replies
undrwd's avatar

Ok, Adam W. helped me get past this problem with this:

rm -rf ~/.composer/vendor

composer global update

valet install

But now I'm having an issue with OSX crashing and restarting when I run Valet Install and it gets to restarting dnsmasq

Anyone seen a similar issue, have any suggestions.

1 like
ejdelmonico's avatar

Run brew doctor and make sure you are actually using the brew installed php (php71). Sometimes you may have to restart your brew services as well.

undrwd's avatar

Hey, thanks for the fast reply, hoping to get this resolved, I'm on the verge of doing a reinstall of OSX.

Here's what brew doctor is telling me:

Warning: A newer Command Line Tools release is available. Update them from Software Update in the App Store.

Warning: "config" scripts exist outside your system or Homebrew directories. ./configure scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking.

Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /usr/local/php5-7.0.4-20160310-143636/bin/curl-config /usr/local/php5-7.0.4-20160310-143636/bin/freetype-config /usr/local/php5-7.0.4-20160310-143636/bin/icu-config /usr/local/php5-7.0.4-20160310-143636/bin/libmcrypt-config /usr/local/php5-7.0.4-20160310-143636/bin/libpng-config /usr/local/php5-7.0.4-20160310-143636/bin/libpng12-config /usr/local/php5-7.0.4-20160310-143636/bin/php-config /usr/local/php5-7.0.4-20160310-143636/bin/xslt-config

Warning: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected dylibs: /usr/local/lib/libmcrypt.4.4.8.dylib

Warning: Unbrewed header files were found in /usr/local/include. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected header files: /usr/local/include/mcrypt.h /usr/local/include/mutils/mcrypt.h /usr/local/include/node/android-ifaddrs.h /usr/local/include/node/ares.h /usr/local/include/node/ares_version.h /usr/local/include/node/libplatform/libplatform.h /usr/local/include/node/nameser.h /usr/local/include/node/node.h /usr/local/include/node/node_buffer.h /usr/local/include/node/node_internals.h /usr/local/include/node/node_object_wrap.h /usr/local/include/node/node_version.h /usr/local/include/node/openssl/opensslconf.h /usr/local/include/node/pthread-fixes.h /usr/local/include/node/smalloc.h /usr/local/include/node/stdint-msvc2008.h /usr/local/include/node/tree.h /usr/local/include/node/uv-aix.h /usr/local/include/node/uv-bsd.h /usr/local/include/node/uv-darwin.h /usr/local/include/node/uv-errno.h /usr/local/include/node/uv-linux.h /usr/local/include/node/uv-sunos.h /usr/local/include/node/uv-threadpool.h /usr/local/include/node/uv-unix.h /usr/local/include/node/uv-version.h /usr/local/include/node/uv-win.h /usr/local/include/node/uv.h /usr/local/include/node/v8-debug.h /usr/local/include/node/v8-platform.h /usr/local/include/node/v8-profiler.h /usr/local/include/node/v8-testing.h /usr/local/include/node/v8-util.h /usr/local/include/node/v8.h /usr/local/include/node/v8config.h /usr/local/include/node/v8stdint.h /usr/local/include/node/zconf.h /usr/local/include/node/zlib.h

Warning: Unbrewed .la files were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected .la files: /usr/local/lib/libmcrypt.la

Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

Warning: Your Xcode (6.2) is outdated. Please update to Xcode 8.2.1 (or delete it). Xcode can be updated from the App Store.

undrwd's avatar

Thanks to ejdelmonico for following up on me with this. Running an update on OSX and brew cleanup resolved this last issue for me valet 2 is up and running.

Please or to participate in this conversation.