我最近刚刚将我的Rstudio更新到0.98.1103版本,现在我无法加载ggplot,它一直抛出以下错误。你知道是怎么回事吗?
> library(ggplot2)
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.1/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /usr/X11/lib/libXft.2.dylib
Referenced from: /usr/local/lib/libtk8.6.dylib
Reason: image not found
Error: package or namespace load failed for ‘ggplot2我尝试删除tcltk库和ggplot2,然后重新安装它们,现在我得到了一组不同的错误:
> library(ggplot2)
Error : package ‘tcltk’ does not have a namespace
Error: package or namespace load failed for ‘ggplot2’
> library(tcltk)
Error in library(tcltk) : ‘tcltk’ is not a valid installed package发布于 2015-03-09 01:28:19
您的系统上似乎没有安装X11。尝试安装xorg (如果您运行的是Linux)或XQuartz (如果您使用的是OSX )。
https://stackoverflow.com/questions/28928168
复制相似问题