mac 安装了phantomjs 2.5 提示:dyld: Library not loaded: /usr/local/opt/webp/lib/libwebp.6.dylib
程序员文章站
2023-12-28 10:39:16
...
环境
系统:macos catalina 10.15.6
phantomjs 版本: 2.5
本机默认webp版本:webp 0.6.0 生成bwebp.7.dylib
$ phantomjs --version
dyld: Library not loaded: /usr/local/opt/webp/lib/libwebp.6.dylib
Referenced from: /usr/local/bin/phantomjs
Reason: image not found
Abort trap: 6
以上是问题信息。
解决:
- 到https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html下载webp 版本0.5.2, 切记版本是libwebp-0.5.2.tar.gz
- 编译生成bwebp.6.dylib
tar xvzf libwebp-0.5.2.tar.gz
cd libwebp-0.5.2
./configure
make
sudo make install
3. 生成软连接:ln -s /usr/local/lib/libwebp.dylib /usr/local/lib/libwebp.6.dylib