laravel / valet

A more enjoyable local development experience for Mac.
https://laravel.com/docs/valet
MIT License
2.52k stars 698 forks source link

Valet stopped working.... #844

Closed lstables closed 4 years ago

lstables commented 4 years ago

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?

drbyte commented 4 years ago

No worries - I submitted my post too fast ;) What's this give you? Needing the directory name in order to do linking: ls -aln /usr/local/Cellar/openssl*

lstables commented 4 years ago

s -aln /usr/local/Cellar/openssl* /usr/local/Cellar/openssl: total 0 drwxr-xr-x 8 501 20 256 12 Apr 2019 . drwxrwxr-x 92 501 80 2944 22 Nov 15:07 .. drwxr-xr-x 13 501 80 416 7 Feb 2018 1.0.2n drwxr-xr-x 13 501 80 416 3 May 2018 1.0.2o_1 drwxr-xr-x 13 501 80 416 21 Jun 2018 1.0.2o_2 drwxr-xr-x 13 501 20 416 24 Oct 2018 1.0.2p drwxr-xr-x 13 501 20 416 30 Dec 2018 1.0.2q drwxr-xr-x 13 501 20 416 12 Apr 2019 1.0.2r

/usr/local/Cellar/openssl@1.1: total 0 drwxr-xr-x 3 501 20 96 22 Nov 14:20 . drwxrwxr-x 92 501 80 2944 22 Nov 15:07 .. drwxr-xr-x 14 501 20 448 22 Nov 14:20 1.1.1d

drbyte commented 4 years ago

Wow, that's a lotta older versions. Let's go with r.

I think this will do it:

ln -s /usr/local/Cellar/openssl/1.0.2r/lib/libssl.1.0.0.dylib /usr/local/opt/openssl/lib/
ln -s /usr/local/Cellar/openssl/1.0.2r/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/
drbyte commented 4 years ago

@lstables is this still a problem? Or can this issue be closed?

lstables commented 4 years ago

All sorted iโ€™ve closed the issue also. Thanks for your help much appreciated. ๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป

lstables commented 4 years ago

@drbyte Although Valet is working in terms of the sites showing, I'm unable to connect to MySQL via Sequel Pro now, do you happen to have any suggestions for this please ;)

lstables commented 4 years ago
ln -s /usr/local/Cellar/openssl/1.0.2r/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/

Scrap that, the above you sent seem to worked and Sequel Pro is now connecting, my bad. I'll re-close the issue.

drbyte commented 4 years ago

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.

lstables commented 4 years ago

Great, I very much appreciate your help in getting me back up & running, glad it's all sorted and I can get back to work now, was debating using Homestead again but don't really want something so heavy.

Thanks again @drbyte

drbyte commented 4 years ago

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.)