Rcmdr launch error in Yosemite (OS X 10.10)

半世苍凉 提交于 2019-12-18 03:39:36

问题


After upgrading to OS X 10.10 Yosemite I started to receive the following error log when running my Rcmdr package in R using library(Rcmdr):

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 'Rcmdr'

Could you help me understand how to fix it?

This mac os x troubleshooting didn't help.


回答1:


Execute the following in a terminal window:

locate libXft.2.dylib

or do it from an R console:

system("locate libXft.2.dylib")

On my Yosemite install it's in /opt/X11/lib/libXft.2.dylib.

If your setup is similar, then:

sudo ln -s /opt/X11 /usr/X11

should help fix this temporarily, but I'd keep looking for a Yosemite R package (since that will accommodate all the changes Apple made to the filesystem structure).

Of note: On my work Mac (Mavericks) this symlink is already there.




回答2:


Reinstalling XQuartz worked for me.




回答3:


I added a symlink from /usr/X11 to /opt/X11 and this resolved the problem without the locate command.



来源:https://stackoverflow.com/questions/26461888/rcmdr-launch-error-in-yosemite-os-x-10-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!