我最近通过此链接在 Mac OSX Yosemite 上安装了 TeXLive
https://tug.org/mactex/
然后我发现 texdoc 如下
$ which texdoc
/opt/local/bin/texdoc
当我运行它时,我收到一个错误
$ texdoc pgf
dyld: Library not loaded: /opt/local/lib/libpng15.15.dylib
Referenced from: /opt/local/bin/texlua
Reason: Incompatible library version: texlua requires version
33.0.0 or later, but libpng15.15.dylib provides version 31.0.0
Trace/BPT trap: 5
然后我尝试修复
$ brew upgrade
$ brew update
$ brew doctor
$ brew uninstall libpng
$ brew install libpng
... outputs don't show any obvious problems ...
但那没用。如果能给我一些建议,让我重新开始安装,我将不胜感激。我能想到的唯一办法就是清理机器,然后从头开始:(
答案1
库版本不兼容:
texlua
需要版本33.0.0
或更高版本,但libpng15.15.dylib
提供的是版本 31.0.0
听起来libpng
你的系统已经过时了,所以如果 Homebrew 没有提供最新版本,可以手动编辑公式brew edit libpng
并url
更改为受支持的公式。
在撰写本文时,libpng
Homebrew 有相关版本可用:
$ brew update
$ brew reinstall libpng
$ otool -L $(brew list libpng | grep dylib$)
/usr/local/Cellar/libpng/1.6.32/lib/libpng.dylib:
/usr/local/opt/libpng/lib/libpng16.16.dylib (compatibility version 49.0.0, current version 49.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)