dyld: Library not loaded: /usr/local/opt/jpeg-xl/lib/libjxl.0.7.dylib

4.2k Views Asked by At

I've upgraded my macbook to Big Sur 11.7.8 and now running php 8.0 (or 8.1, 8.2) in the terminal fails with this error.

dyld: Library not loaded: /usr/local/opt/jpeg-xl/lib/libjxl.0.7.dylib
  Referenced from: /usr/local/opt/libavif/lib/libavif.15.dylib
  Reason: image not found
Abort trap: 6

I've tried removing and reinstalling with brew, brew upgrade and cleanup but so far no luck. I only get the same error during the install process. Any ideas please?

Thanks

2

There are 2 best solutions below

0
Xiao On

I ran into same issue when upgrading to MacOS Big Sur 11.7.8. The solution is to reinstall jpeg-xl.

If you use brew, then

brew install jpeg-xl

Would do the trick.

1
binhhoang18 On

I had the same issue after installing macOS Sonoma. Try to reinstall gd:

brew reinstall gd