I am on High Sierra 10.13.6 and I recently ran into an issue with my Homebrew environment for local dev work. I can’t seem to figure out what is the problem. Any Composer or Drush commands will give this
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Abort trap: 6
I restarted my computer and when I try to start apachectl; I get
httpd: Syntax error on line 179 of /usr/local/etc/httpd/httpd.conf: Cannot load /usr/local/Cellar/php71/7.1.12_23/libexec/apache2/libphp7.so into server: dlopen(/usr/local/Cellar/php71/7.1.12_23/libexec/apache2/libphp7.so, 10): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylibn Referenced from: /usr/local/Cellar/php71/7.1.12_23/libexec/apache2/libphp7.son Reason: image not found
I think this is because the path is looking for openssl, but in the Brew list, I don’t have openssl anymore, it is now [email protected]
Bash profile has the following:
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
$which openssl returns
/usr/local/opt/[email protected]/bin/openssl
What can I do to resolve this? Maybe I’m missing the obvious.
2
Answers
So in case anyone runs into this. I managed to fix this myself.
First I commented out the following line in my usr/local/etc/httpd/httpd.conf file
Next I ran
I added the following lines to .bash_profile
Then added the following line to usr/local/etc/httpd/httpd.conf file
Then I restarted my computer then ran
Then I had some sql connection issues.
And everything came together. Hope this helps.
If that helps somebody else not willing to reinstall PHP: