valet: Valet stopped working....

My install as stopped working after I did a composer global update, this seemed to be a problem with the new Symfony update, which as been fixed in Valet version 2.5.3 #810 with thanks to @drbyte

But after a fresh install of valet and parking the code directory I’m still unable to access any of my sites.

Chrome just displays:

This site can’t be reached
nrs.test refused to connect.

Is there anything else I can try to hopefully get this back working?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 60 (27 by maintainers)

Most upvoted comments

dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib Referenced from: /usr/local/bin/php Reason: image not found dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /usr/local/Cellar/php@5.6/5.6.40/bin/php Reason: image not found

Side note: when working with the exolnet php@5.6 image, if homebrew has openssl@1.1 installed (or if it “only” has 1.1 installed) it may have unlinked all the openssl 1.0 links, which will result in the above error even if the 1.0 files “do” exist in Homebrew. This can also happen with an openssl@1.1 upgrade (which Homebrew incorporated recently).

Manually symlinking them can be done with these commands:

ln -s /usr/local/Cellar/openssl/1.0.2t/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
ln -s /usr/local/Cellar/openssl/1.0.2t/lib/libssl.1.0.0.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

(Of course, if your Cellar subdirectory names are different from 1.0.2t, adjust accordingly.)

One day I hope to figure out what causes these broken links to the various versions of openssl. I think it’s related to in-place OS upgrades (vs fresh MacOS installs), but I’m not certain of that. (I’m thinking it’s left fragments of config files or dependencies pointing to specific (older) versions of file dependencies. And I don’t think Homebrew itself can really fix it either. Still haven’t found proof either way though.)

In the meantime I’m glad the manual linking of the files is working for you. 👍

Technically I don’t think it’s a Valet matter. But unfortunately affects the use of various things Valet depends on.

All sorted i’ve closed the issue also. Thanks for your help much appreciated. 👍🏻👍🏻

Then I’d be inclined to clear those node-related things using something like this:

rm -rf /usr/local/include/node
rm -rf /usr/local/Cellar/node 

Oh, phew! I was getting to the end of my options for troubleshooting!

Bad Gateway means PHP and Nginx aren’t talking. This is a config issue.

Have you done any special configs for valet? I’m thinking maybe it’s a good time to run valet install and let it reset some things, particularly since I suspect the nginx config may have been altered by the nginx upgrade. Just be mindful that running valet install does overwrite some things. This is fine for majority of people, but if you’ve done some custom php/nginx config alterations in /usr/local/etc/ folders then those will be wiped, so you might want to make a backup of the php and nginx subdirs from there.

It’s also worth rebuilding and re-securing all your valet sites, by running valet tld test. You may want to backup your ~/.config/valet folder first if you’ve done any custom config stuff in there.

nginx: [emerg] unknown directive "http2_push_preload" in /Users/lee/.config/valet/Nginx/application_app.test:13
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed

nginx version: nginx/1.13.8

http2_push_preload was not added into Nginx until 1.13.9 (released February 20th, 2018) Since you’re using an Nginx version older than Feb 2018, are you opposed to upgrading it to the latest that Homebrew offers?
brew upgrade nginx