geoR
我通过安装了软件包install.packages("geoR", dependencies = TRUE)
,效果很好。但是,在加载它时,我得到
Error: package or namespace load failed for ‘geoR’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object'
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/tcltk/libs/t cltk.so, 10):
Library not loaded: /opt/X11/lib/libfontconfig.1.dylib
Referenced from: /usr/local/lib/libtk8.6.dylib
Reason: Incompatible library version: libtk8.6.dylib requires
version 11.0.0 or later, but libfontconfig.1.dylib provides version 10.0.0
我认为我可能需要更新 fontconfig,我使用自制软件进行了更新:
brew install fontconfig
我也重新链接了
brew unlink fontconfig && brew link fontconfig
然后,我检查了版本
lorenz$ otool -L /usr/local/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib:
/usr/local/lib/libtk8.6.dylib (compatibility version 8.6.0, current version 8.6.6)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
/opt/X11/lib/libXft.2.dylib (compatibility version 6.0.0, current version 6.2.0)
/opt/X11/lib/libfontconfig.1.dylib (compatibility version 11.0.0, current version 11.2.0)
/opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/opt/X11/lib/libXss.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
这对我来说看起来不错。但即使重新启动,错误仍然存在。我在这里发现了其他类似这样的问题,但对我的情况没有帮助。
更新
我还重新安装了 R 3.4.4(因此重新安装了 R 包 tcltk,它是一个基本包),但它没有帮助。我正在运行 macOS High Sierra (10.12.6)。我还用自制软件重新安装了 tcltk。安装成功,但我收到以下消息
This formula is keg-only, which means it was not symlinked into /usr/local,
because tk installs some X11 headers and macOS provides an (older) Tcl/Tk.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/tcl-tk/lib
CPPFLAGS: -I/usr/local/opt/tcl-tk/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/tcl-tk/lib/pkgconfig
所以我不确定我现在必须做什么。