dyld: Library not loaded: /usr/local/opt/tidy-html5/lib/libtidy.5.dylib
Asked Answered
M

4

10

I have problem with my php on mac, previously I had 2 php versions php7.3 and php7.2. for some reason I uninstalled them then reinstall php7.2. when I run brew link [email protected] and php -v I'm getting message dyld: Library not loaded: /usr/local/opt/tidy-html5/lib/libtidy.5.dylib Referenced from: /usr/local/opt/[email protected]/bin/php I already run command brew update brew upgrade php reinstall [email protected] but I'm getting same error message.

Mercerize answered 28/9, 2021 at 4:24 Comment(0)
R
17

Had the same problem, after switching [email protected] (back) to php 7.2

Reinstall [email protected] didn't help. What did help was:

brew reinstall tidy-html5
Ruyle answered 14/10, 2021 at 8:50 Comment(0)
G
15
brew reinstall gd

Good one from Thomas with the tip dyld[45923]: Library not loaded: /usr/local/opt/libavif/lib/libavif.15.dylib

This cleared up errors of /usr/local/opt/libtiff/lib/libtiff.5.dylib and the likes.

Goodill answered 6/10, 2023 at 18:13 Comment(1)
Worked for me as well. :)Philtre
S
4

OK, I am sure this is not the right way to do it, but it worked for me. I believe it may have to do with PHP 7.2 reaching end of life and things not installing correctly as it's now deprecated upstream.

I went ahead and looked at the /usr/local/opt/tidy-html5/lib/ folder and indeed libtidy.5.dylib was not there... but libtidy.5.8.0.dylib was. So I just symlinked the dylib I had to libtidy.5.dylib like so:

ln -s /usr/local/opt/tidy-html5/lib/libtidy.5.8.0.dylib /usr/local/opt/tidy-html5/lib/libtidy.5.dylib

And that worked great!

There were a few other libraries that needed the same treatment within the /usr/local/opt/openldap/lib/ folder, but it was the same idea. Look in the folder where it's failing to find the library and it might just be named with a more specific version number. ln -s them (or even cp or mv them) to match the file that PHP is looking for and you'll be good to go.

Syneresis answered 10/12, 2021 at 17:44 Comment(0)
S
-1

In my case, i had to uninstall [email protected] with brew. If you have some related configuration in ./bash_profile o similar, dont forget check it in order to avoid misconfiguration issues

Synthesis answered 15/1, 2022 at 17:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.