使用任何PHP应用程序导致:
dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
[1] 4494 trace trap php
Run Code Online (Sandbox Code Playgroud)
我的大多数php应用程序都是使用自制程序安装的,但作曲家除外(使用curl安装)
我尝试删除libpng并用homebrew重新安装无济于事.
接下来是切换到错误消息中所述的最新版本的libpng 1.5:
$ brew info libpng
libpng: stable 1.6.10 (bottled)
http://www.libpng.org/pub/png/libpng.html
/usr/local/Cellar/libpng/1.5.17 (15 files, 1.0M)
Poured from bottle
/usr/local/Cellar/libpng/1.5.18 (15 files, 1.0M)
Poured from bottle
/usr/local/Cellar/libpng/1.6.10 (17 files, 1.3M) *
$ brew switch libpng 1.5.18
Cleaning /usr/local/Cellar/libpng/1.5.17
Cleaning /usr/local/Cellar/libpng/1.5.18
Cleaning /usr/local/Cellar/libpng/1.6.10
16 links created for /usr/local/Cellar/libpng/1.5.18
Run Code Online (Sandbox Code Playgroud)
现在错误已更改为:
dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib
Referenced from: /usr/local/lib/libfreetype.6.dylib
Reason: image not found
[1] …Run Code Online (Sandbox Code Playgroud)