laravel / valet

A more enjoyable local development experience for Mac.
https://laravel.com/docs/valet
MIT License
2.5k stars 691 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

First things I’d check are the following. Can you post your output of these?

brew services list Should show nginx and php and dnsmasq running. If dnsmasq isn't running correctly then you'll get no connections.

sudo nginx -t Should report no errors. If a config file for any of the domains is busted, or a certificate, nginx will refuse to run, thus refusing connections.

To test whether dnsmasq is resolving things, the output of the following should be successful and not report any error:

nslookup nrs.test

drbyte commented 4 years ago

And, for baseline, let's also look at the following:

sw_vers
valet --version
cat ~/.config/valet/config.json
ls -al /etc/sudoers.d/
php -v
which -a php
nginx -v
drbyte commented 4 years ago

For dnsmasq troubleshooting:

  1. What's in your ~/.config/valet/dnsmasq.conf file? By default valet usually just puts the following:
    address=/.test/127.0.0.1
    listen-address=127.0.0.1

    but you could add these additional lines to get it to do some logging:

    # Logging
    log-facility=/Users/PUT_YOUR_USERNAME_HERE/.config/valet/Log/dnsmasq.log
    log-queries

    (and then restart it:)

    sudo brew services stop dnsmasq
    sudo brew services start dnsmasq

Then go inspect that log file to see if it reported any errors on startup.

lstables commented 4 years ago

This is what I am seeing with the following commands

➜  code sudo nginx -t
Password:
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
➜  code nslookup nrs.test
Server:     192.168.0.1
Address:    192.168.0.1#53

** server can't find nrs.test: NXDOMAIN

➜  code
lstables commented 4 years ago
code sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.1
BuildVersion:   19B88
➜  code valet --version
Laravel Valet 2.5.3
➜  code cat ~/.config/valet/config.json
{
    "domain": "test",
    "paths": [
        "/Users/lee/.config/valet/Sites",
        "/Users/lee/code"
    ],
    "tld": "test"
}
➜  code ls -al /etc/sudoers.d/
total 16
drwxr-xr-x    4 root  wheel   128  1 Nov 17:19 .
drwxr-xr-x  115 root  wheel  3680 21 Nov 21:38 ..
-rw-r--r--    1 root  wheel    80  2 Sep 12:47 brew
-rw-r--r--    1 root  wheel    83  2 Sep 12:47 valet
➜  code php -v
PHP 7.2.11 (cli) (built: Oct 11 2018 16:23:09) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.11, Copyright (c) 1999-2018, by Zend Technologies
➜  code which -a php
/usr/local/bin/php
/usr/bin/php
➜  code nginx -v
nginx version: nginx/1.13.8
lstables commented 4 years ago

dnsmasq.log

Nov 22 13:28:27 dnsmasq[19623]: started, version 2.78 cachesize 150
Nov 22 13:28:27 dnsmasq[19623]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack no-ipset auth no-DNSSEC loop-detect no-inotify
Nov 22 13:28:27 dnsmasq[19623]: setting --bind-interfaces option because of OS limitations
Nov 22 13:28:27 dnsmasq[19623]: reading /etc/resolv.conf
Nov 22 13:28:27 dnsmasq[19623]: using nameserver 192.168.0.1#53
Nov 22 13:28:27 dnsmasq[19623]: using nameserver fd8e:23f:a17e:0:a2bd:cdff:fe33:1838#53
Nov 22 13:28:27 dnsmasq[19623]: read /etc/hosts - 3 addresses
lstables commented 4 years ago

Services list:

➜  code brew services list
Name       Status  User Plist
dnsmasq    started root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
mysql      started lee  /Users/lee/Library/LaunchAgents/homebrew.mxcl.mysql.plist
nginx      started root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
php        started root /Library/LaunchDaemons/homebrew.mxcl.php.plist
php@7.1    started lee  /Users/lee/Library/LaunchAgents/homebrew.mxcl.php@7.1.plist
rabbitmq   stopped
redis      started lee  /Users/lee/Library/LaunchAgents/homebrew.mxcl.redis.plist
supervisor started lee  /Users/lee/Library/LaunchAgents/homebrew.mxcl.supervisor.plist
drbyte commented 4 years ago
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

lstables commented 4 years ago

Ah I did not know that, let me upgrade and see how that pans out. Thanks @drbyte for your help so far.

drbyte commented 4 years ago

After that if it's still giving troubles, try a reboot (since this affects a service on protected ports, < 1000).

If the nslookup still fails then I recommend telling your Mac to expect to work with dnsmasq as a priority: To prevent it from specifically doing DNS queries to public sources first instead of to localhost, go into your macOS network settings and add 127.0.0.1 as the first DNS resolver. A lot of times this solves any oddities where a subsystem bypasses dnsmasq and can't resolve the local .test domain.

OSX DNS config
lstables commented 4 years ago

After a restart and upgrading nginx, i now see

502 Bad Gateway nginx/1.17.3

drbyte commented 4 years ago

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.

lstables commented 4 years ago

valet install isn't working now and seems its openssl so i removed and reinstalled but still get;

➜  code valet install
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/libcrypto.1.0.0.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
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/libcrypto.1.0.0.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
/usr/local/bin/valet: line 63:  4994 Abort trap: 6           php "$DIR/cli/valet.php" "$@"
lstables commented 4 years ago

Also sorry I forgot to mention I don't have any "special" settings or anything, just standard valet install and a code directory to store my sites within. Just trying brew update and brew upgrade.... ;(

drbyte commented 4 years ago

brew update && brew upgrade is usually all I do too. And brew cleanup once a month or so.

drbyte commented 4 years ago

What do these show?

openssl version -a
curl --version
php --ri curl
brew info openssl
openssl ciphers
lstables commented 4 years ago
➜  code openssl version -a
LibreSSL 2.8.3
built on: date not available
platform: information not available
options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: information not available
OPENSSLDIR: "/private/etc/ssl"
➜  code curl --version
curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets
lstables commented 4 years ago
➜  code php --ri curl

curl

cURL support => enabled
cURL Information => 7.67.0
Age => 5
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => No
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => Yes
SSL => Yes
SSPI => No
TLS-SRP => Yes
HTTP2 => Yes
GSSAPI => Yes
KERBEROS5 => Yes
UNIX_SOCKETS => Yes
PSL => No
HTTPS_PROXY => Yes
MULTI_SSL => No
BROTLI => Yes
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => x86_64-apple-darwin19.0.0
SSL Version => OpenSSL/1.1.1d
ZLib Version => 1.2.11
libSSH Version => libssh2/1.9.0

Directive => Local Value => Master Value
curl.cainfo => no value => no value
code brew info openssl
openssl@1.1: stable 1.1.1d (bottled) [keg-only]
Cryptography and SSL/TLS Toolkit
https://openssl.org/
/usr/local/Cellar/openssl@1.1/1.1.1d (7,983 files, 17.9MB)
  Poured from bottle on 2019-11-22 at 14:20:22
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl@1.1.rb
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
  /usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because openssl/libressl is provided by macOS so don't link an incompatible version.

If you need to have openssl@1.1 first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

For pkg-config to find openssl@1.1 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"

==> Analytics
install: 518,331 (30 days), 1,729,317 (90 days), 2,227,853 (365 days)
install_on_request: 34,843 (30 days), 127,951 (90 days), 405,649 (365 days)
build_error: 0 (30 days)
➜  code openssl ciphers
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:GOST2012256-GOST89-GOST89:DHE-RSA-CAMELLIA256-SHA256:DHE-RSA-CAMELLIA256-SHA:GOST2001-GOST89-GOST89:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA256:CAMELLIA256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-CAMELLIA128-SHA256:DHE-RSA-CAMELLIA128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:CAMELLIA128-SHA256:CAMELLIA128-SHA:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:RC4-SHA:RC4-MD5:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA
lstables commented 4 years ago

Well that was weird.....I posted all of that for you to see, did brew cleanup and update/upgrade again, reinstalled composer valet package, ran valet install, park etc and re-did the SSL for each of the sites and now works, so now I'm like wtf....lol

@drbyte Chris you are a legend anyhow, thank you thank you for your help today with the issue, I presume it was brew cleanup that did the trick, but I'm not to know ;)

lstables commented 4 years ago

Although it seems Sequel Pro/MySQL as stopped working now, and services list shows it's running

drbyte commented 4 years ago

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

drbyte commented 4 years ago

Hmmm ... trying to remember how to get MySQL to report its errors...

lstables commented 4 years ago

Yeah I'm just googling as we speak....

drbyte commented 4 years ago

What version? mysql --version

lstables commented 4 years ago

Hmmm, getting similar error as before now:

code mysql --version
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/mysql
  Reason: image not found
[1]    81172 abort      mysql --version
drbyte commented 4 years ago

What's the output of brew doctor? I'm curious about broken links related to openssl or the libssl library.

lstables commented 4 years ago
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-php
Untap them with `brew untap`.

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/node/android-ifaddrs.h
  /usr/local/include/node/libplatform/libplatform-export.h
  /usr/local/include/node/libplatform/libplatform.h
  /usr/local/include/node/libplatform/v8-tracing.h
  /usr/local/include/node/node.h
  /usr/local/include/node/node_api.h
  /usr/local/include/node/node_api_types.h
  /usr/local/include/node/node_buffer.h
  /usr/local/include/node/node_object_wrap.h
  /usr/local/include/node/node_version.h
  /usr/local/include/node/openssl/aes.h
  /usr/local/include/node/openssl/archs/BSD-x86/opensslconf.h
  /usr/local/include/node/openssl/archs/BSD-x86_64/opensslconf.h
  /usr/local/include/node/openssl/archs/VC-WIN32/opensslconf.h
  /usr/local/include/node/openssl/archs/VC-WIN64A/opensslconf.h
  /usr/local/include/node/openssl/archs/aix-gcc/opensslconf.h
  /usr/local/include/node/openssl/archs/aix64-gcc/opensslconf.h
  /usr/local/include/node/openssl/archs/darwin-i386-cc/opensslconf.h
  /usr/local/include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-aarch64/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-armv4/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-elf/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-ppc/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-ppc64/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-x32/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-x86_64/opensslconf.h
  /usr/local/include/node/openssl/archs/linux32-s390x/opensslconf.h
  /usr/local/include/node/openssl/archs/linux64-s390x/opensslconf.h
  /usr/local/include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
  /usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
  /usr/local/include/node/openssl/asn1.h
  /usr/local/include/node/openssl/asn1_mac.h
  /usr/local/include/node/openssl/asn1t.h
  /usr/local/include/node/openssl/bio.h
  /usr/local/include/node/openssl/blowfish.h
  /usr/local/include/node/openssl/bn.h
  /usr/local/include/node/openssl/buffer.h
  /usr/local/include/node/openssl/camellia.h
  /usr/local/include/node/openssl/cast.h
  /usr/local/include/node/openssl/cmac.h
  /usr/local/include/node/openssl/cms.h
  /usr/local/include/node/openssl/comp.h
  /usr/local/include/node/openssl/conf.h
  /usr/local/include/node/openssl/conf_api.h
  /usr/local/include/node/openssl/crypto.h
  /usr/local/include/node/openssl/des.h
  /usr/local/include/node/openssl/des_old.h
  /usr/local/include/node/openssl/dh.h
  /usr/local/include/node/openssl/dsa.h
  /usr/local/include/node/openssl/dso.h
  /usr/local/include/node/openssl/dtls1.h
  /usr/local/include/node/openssl/e_os2.h
  /usr/local/include/node/openssl/ebcdic.h
  /usr/local/include/node/openssl/ec.h
  /usr/local/include/node/openssl/ecdh.h
  /usr/local/include/node/openssl/ecdsa.h
  /usr/local/include/node/openssl/engine.h
  /usr/local/include/node/openssl/err.h
  /usr/local/include/node/openssl/evp.h
  /usr/local/include/node/openssl/hmac.h
  /usr/local/include/node/openssl/idea.h
  /usr/local/include/node/openssl/krb5_asn.h
  /usr/local/include/node/openssl/kssl.h
  /usr/local/include/node/openssl/lhash.h
  /usr/local/include/node/openssl/md4.h
  /usr/local/include/node/openssl/md5.h
  /usr/local/include/node/openssl/mdc2.h
  /usr/local/include/node/openssl/modes.h
  /usr/local/include/node/openssl/obj_mac.h
  /usr/local/include/node/openssl/objects.h
  /usr/local/include/node/openssl/ocsp.h
  /usr/local/include/node/openssl/opensslconf.h
  /usr/local/include/node/openssl/opensslv.h
  /usr/local/include/node/openssl/ossl_typ.h
  /usr/local/include/node/openssl/pem.h
  /usr/local/include/node/openssl/pem2.h
  /usr/local/include/node/openssl/pkcs12.h
  /usr/local/include/node/openssl/pkcs7.h
  /usr/local/include/node/openssl/pqueue.h
  /usr/local/include/node/openssl/rand.h
  /usr/local/include/node/openssl/rc2.h
  /usr/local/include/node/openssl/rc4.h
  /usr/local/include/node/openssl/ripemd.h
  /usr/local/include/node/openssl/rsa.h
  /usr/local/include/node/openssl/safestack.h
  /usr/local/include/node/openssl/seed.h
  /usr/local/include/node/openssl/sha.h
  /usr/local/include/node/openssl/srp.h
  /usr/local/include/node/openssl/srtp.h
  /usr/local/include/node/openssl/ssl.h
  /usr/local/include/node/openssl/ssl2.h
  /usr/local/include/node/openssl/ssl23.h
  /usr/local/include/node/openssl/ssl3.h
  /usr/local/include/node/openssl/stack.h
  /usr/local/include/node/openssl/symhacks.h
  /usr/local/include/node/openssl/tls1.h
  /usr/local/include/node/openssl/ts.h
  /usr/local/include/node/openssl/txt_db.h
  /usr/local/include/node/openssl/ui.h
  /usr/local/include/node/openssl/ui_compat.h
  /usr/local/include/node/openssl/whrlpool.h
  /usr/local/include/node/openssl/x509.h
  /usr/local/include/node/openssl/x509_vfy.h
  /usr/local/include/node/openssl/x509v3.h
  /usr/local/include/node/pthread-barrier.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-os390.h
  /usr/local/include/node/uv-posix.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-inspector-protocol.h
  /usr/local/include/node/v8-inspector.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-value-serializer-version.h
  /usr/local/include/node/v8-version-string.h
  /usr/local/include/node/v8-version.h
  /usr/local/include/node/v8.h
  /usr/local/include/node/v8config.h
  /usr/local/include/node/zconf.h
  /usr/local/include/node/zlib.h

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  redis
  cocoapods
drbyte commented 4 years ago

Wow, I wouldn't have expected all those header files. I'm inclined to suggest running brew remove node and then brew doctor to see that they're cleaned up, and then brew install node if you want node back again.

And if you're not using cocoapods I'd run brew remove on it too.

Neither of these deals with the openssl thing though.

lstables commented 4 years ago

It won't remove node Error: No such keg: /usr/local/Cellar/node I've removed cocoapods though don't use that no more. Brew doctor still showing same list

drbyte commented 4 years ago

What's the output of:

which -a openssl
ls -l /usr/local/opt/openssl

The first should say /usr/local/opt/openssl if I'm reading your other posts correctly. The second should tell us where it's actually reading the binary from.

lstables commented 4 years ago

which states /usr/bin/openssl

ls -l /usr/local/opt/openssl states lrwxr-xr-x 1 lee admin 28 22 Nov 14:20 /usr/local/opt/openssl -> ../Cellar/openssl@1.1/1.1.1d

drbyte commented 4 years ago

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 
lstables commented 4 years ago

Yep done that buddy.

lstables commented 4 years ago

Now brew dr shows

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-php
Untap them with `brew untap`.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  redis

I'll leave redis for now as I do plan on using it,

drbyte commented 4 years ago

You could safely run brew link redis if you wanted that warning to disappear

drbyte commented 4 years ago

What about ls -aln /usr/local/opt/openssl/lib/

This gives me (granted on this machine I'm using Mojave, so some differences):

drwxr-xr-x  10 501  20      320 Sep 10 09:36 .
drwxr-xr-x  13 501  20      416 Sep 23 15:14 ..
drwxr-xr-x  14 501  20      448 Sep 10 09:36 engines
-rw-r--r--   1 501  20  1864432 Sep 23 15:14 libcrypto.1.0.0.dylib
-r--r--r--   1 501  20  3213368 Sep 10 09:36 libcrypto.a
lrwxr-xr-x   1 501  20       21 Sep 10 09:36 libcrypto.dylib -> libcrypto.1.0.0.dylib
-r--r--r--   1 501  20   371128 Sep 23 15:14 libssl.1.0.0.dylib
-r--r--r--   1 501  20   517912 Sep 10 09:36 libssl.a
lrwxr-xr-x   1 501  20       18 Sep 10 09:36 libssl.dylib -> libssl.1.0.0.dylib
drwxr-xr-x   5 501  20      160 Sep 23 15:14 pkgconfig
lstables commented 4 years ago

For sure, yep just done that while I was awaiting your reply to link redis

lstables commented 4 years ago
ls -aln /usr/local/opt/openssl/lib/
total 14464
drwxr-xr-x  10 501  20      320 10 Sep 14:13 .
drwxr-xr-x  14 501  20      448 22 Nov 14:20 ..
drwxr-xr-x   4 501  20      128 10 Sep 14:13 engines-1.1
-r--r--r--   1 501  20  2257472 22 Nov 14:20 libcrypto.1.1.dylib
-r--r--r--   1 501  20  3924000 10 Sep 14:13 libcrypto.a
lrwxr-xr-x   1 501  20       19 10 Sep 14:13 libcrypto.dylib -> libcrypto.1.1.dylib
-r--r--r--   1 501  20   490044 22 Nov 14:20 libssl.1.1.dylib
-r--r--r--   1 501  20   721848 10 Sep 14:13 libssl.a
lrwxr-xr-x   1 501  20       16 10 Sep 14:13 libssl.dylib -> libssl.1.1.dylib
drwxr-xr-x   5 501  20      160 22 Nov 14:20 pkgconfig
drbyte commented 4 years ago

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

Okay, I'm guessing there's an openssl config file somewhere that's pointing to the 1.0.0 file, which doesn't exist.

lstables commented 4 years ago

Brew dr is ready to brew by the way now no errors

lstables commented 4 years ago

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

Okay, I'm guessing there's an openssl config file somewhere that's pointing to the 1.0.0 file, which doesn't exist.

Ok, so how do you see me finding the problem and how best to fix it? ;)

drbyte commented 4 years ago

ls -aln /usr/local/etc/openssl* gives me:

/usr/local/etc/openssl:
total 568
drwxr-xr-x   5 501  80     160 Oct  4 16:12 .
drwxrwxr-x  41 501  80    1312 Nov 22 08:40 ..
-rw-r--r--   1 501  80  275794 Oct  4 16:12 cert.pem
drwxr-xr-x   9 501  80     288 Nov 27  2018 misc
-rw-r--r--   1 501  80   10835 Sep 23 15:14 openssl.cnf

/usr/local/etc/openssl@1.1:
total 608
drwxr-xr-x   8 501  80     256 Sep 12 21:42 .
drwxrwxr-x  41 501  80    1312 Nov 22 08:40 ..
-rw-r--r--   1 501  80  275795 Sep 12 21:41 cert.pem
-rw-r--r--   1 501  80     412 Sep 12 21:41 ct_log_list.cnf
-rw-r--r--   1 501  80     412 Sep 12 21:41 ct_log_list.cnf.dist
drwxr-xr-x   7 501  80     224 Sep 12 21:41 misc
-rw-r--r--   1 501  80   10909 Sep 12 21:41 openssl.cnf
-rw-r--r--   1 501  80   10909 Sep 12 21:41 openssl.cnf.dist
lstables commented 4 years ago

Mine give me....

/usr/local/etc/openssl:
total 584
drwxr-xr-x   5 501  80     160 22 Nov 14:27 .
drwxrwxr-x  31 501  80     992 22 Nov 14:48 ..
-rw-r--r--   1 501  80  286678 12 Apr  2019 cert.pem
drwxr-xr-x   9 501  80     288  7 Feb  2018 misc
-rw-r--r--   1 501  80   10835 12 Apr  2019 openssl.cnf

/usr/local/etc/openssl@1.1:
total 608
drwxr-xr-x   8 501  80     256 22 Nov 14:27 .
drwxrwxr-x  31 501  80     992 22 Nov 14:48 ..
-rw-r--r--   1 501  80  275795 22 Nov 14:20 cert.pem
-rw-r--r--   1 501  80     412 22 Nov 14:20 ct_log_list.cnf
-rw-r--r--   1 501  80     412 22 Nov 14:20 ct_log_list.cnf.dist
drwxr-xr-x   5 501  80     160 22 Nov 13:45 misc
-rw-r--r--   1 501  80   10909 22 Nov 14:20 openssl.cnf
-rw-r--r--   1 501  80   10909 22 Nov 14:20 openssl.cnf.dist
drbyte commented 4 years ago

I'm tempted to try:

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

Ok tried that, but nothing outputted....?

lstables commented 4 years ago
mysql --version
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/mysql
  Reason: image not found
[1]    21067 abort      mysql --version
drbyte commented 4 years ago

Hmmm. I can't remember, did we determine the file actually exists? ls -aln /usr/local/opt/openssl/lib/

lstables commented 4 years ago
ls -aln /usr/local/opt/openssl/lib/
total 14464
drwxr-xr-x  10 501  20      320 10 Sep 14:13 .
drwxr-xr-x  14 501  20      448 22 Nov 14:20 ..
drwxr-xr-x   4 501  20      128 10 Sep 14:13 engines-1.1
-r--r--r--   1 501  20  2257472 22 Nov 14:20 libcrypto.1.1.dylib
-r--r--r--   1 501  20  3924000 10 Sep 14:13 libcrypto.a
lrwxr-xr-x   1 501  20       19 10 Sep 14:13 libcrypto.dylib -> libcrypto.1.1.dylib
-r--r--r--   1 501  20   490044 22 Nov 14:20 libssl.1.1.dylib
-r--r--r--   1 501  20   721848 10 Sep 14:13 libssl.a
lrwxr-xr-x   1 501  20       16 10 Sep 14:13 libssl.dylib -> libssl.1.1.dylib
drwxr-xr-x   5 501  20      160 22 Nov 14:20 pkgconfig
drbyte commented 4 years ago

Ah, yes. Let's link in the 1.0.0 files from the brew Cellar ...

lstables commented 4 years ago

Sorry how would one do that? Not really a brew user me without guidance lol