Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
551 views
in Technique[技术] by (71.8m points)

r - Rcmdr launch error in Yosemite (OS X 10.10)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...