Can';在OS X Yosemite升级后,在R中加载X11,而不是根目录

Can';在OS X Yosemite升级后,在R中加载X11,而不是根目录,r,macos,root,x11,osx-yosemite,R,Macos,Root,X11,Osx Yosemite,当我尝试用R安装一些软件包时,我收到以下错误消息 shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Error in setwd(cDir) : character argument expected In addition: Warning message: In doTryCatch(return(expr),

当我尝试用R安装一些软件包时,我收到以下错误消息

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Error in setwd(cDir) : character argument expected
In addition: Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
  dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
  Reason: image not found
Error in setwd(cDir) : character argument expected
这个问题已经在这里解决了:

我的问题是我在这个mac上没有根访问权限。有没有办法在没有root访问权限的情况下解决此问题

谢谢

如果X以前工作过(因此之前安装过),请管理员删除并重新安装XQuartz软件包。