shivammathur / homebrew-php

:beer: Homebrew tap for PHP 5.6 to 8.4. PHP 8.4 is built nightly.

Home Page:https://github.com/shivammathur/homebrew-php/packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

php@7.2 installation fails because of a tidy_html5 missing link

diam opened this issue · comments

commented

Bonjour,

I need to install php-7.2 (not newer because of some dependencies) on a new Macmini under Macos bigsur 11.4.
But the following command failed:

brew install php@7.2

=>

...
dyld: Library not loaded: /opt/homebrew/opt/tidy-html5/lib/libtidy.5.dylib
  Referenced from: /opt/homebrew/Cellar/php@7.2/7.2.34_4/bin/php
  Reason: image not found
Warning: The post-install step did not complete successfully
You can try again using:
  brew postinstall php@7.2
...

But I was able to solve my problem by adding a link for a tidy_html5 library.

cd /opt/homebrew/opt/tidy-html5/lib

ls -l
=>
-rw-r--r--  ...   889792 15 jul 17:08 libtidy.5.8.0.dylib
lrwxr-xr-x  ...       19 10 jul 22:53 libtidy.58.dylib -> libtidy.5.8.0.dylib
-r--r--r--  ...  1216816 10 jul 22:53 libtidy.a
lrwxr-xr-x  ...       16 10 jul 22:53 libtidy.dylib -> libtidy.58.dylib
drwxr-xr-x  ...       96 15 jul 17:08 pkgconfig

ln -s libtidy.58.dylib libtidy.5.dylib

And then it works.
Maybe there is an incomplete installation of tidi_html5?

Thank for maintaining all these php environments!
-- Maurice

Yes, reinstalling the latest build of PHP 7.2 and html-tidy5 should fix the issue

brew update
brew reinstall tidy-html5 shivammathur/php/php@7.2