当我尝试在我的 M1 mac 上添加一些 php 扩展时出现问题

Problem when I try to add some php extension on my M1 mac

提问人:Clément Talleu 提问时间:9/13/2023 最后编辑:JamesRatClément Talleu 更新时间:10/17/2023 访问量:3091

问:

尝试安装sqlite扩展后,我无法再在Mac上运行php。我不断收到冲泡错误。

有没有人遇到过类似的问题?

dyld[58991]: Library not loaded: /opt/homebrew/opt/libavif/lib/libavif.15.dylib
  Referenced from: <87C1A268-34E4-396F-8BBC-D5591064E333> /opt/homebrew/Cellar/gd/2.3.3_5/lib/libgd.3.dylib
  Reason: tried: '/lib/libavif.15.dylib' (no such file), '/libavif.15.dylib' (no such file), '/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/usr/local/lib/libavif.15.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/libavif.15.dylib' (no such file, not in dyld cache), '/lib/libavif.15.dylib' (no such file), '/libavif.15.dylib' (no such file), '/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/usr/local/lib/libavif.15.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/libavif.15.dylib' (no such file, not in dyld cache)

我关注其他问题,但没有什么能解决我的 pb

macOS SQLite 自制 php 扩展 libav

评论


答:

32赞 Sébastien Séjourné 9/15/2023 #1

要解决此问题,您需要安装或重新安装 GD

$ brew install gd

或者,如果您已经安装了 GD,请运行

$ brew reinstall gd