我遇到问题,在尝试安装软件包时,收到以下错误消息:
> install.packages("png")
--- Please select a CRAN mirror for use in this session ---
Error: .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.2/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/tcltk/libs/t cltk.so, 10): Library not loaded: /usr/X11/lib/libXft.2.dylib
Referenced from: /usr/local/lib/libtk8.6.dylib
Reason: image not found
我不确定R在抱怨什么?
以下是会话信息输出:
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)
locale:
[1] C
解决了!这个问题被错误地标记为重复,错误地说我的意思是在所谓的重复问题中没有可用的有效解决方案。更新到OS X 10.10.3时会出现问题 - “某事”发生'tcltk'不可用。然而,只需重新安装XQuartz即可解决问题!