5

I get the following ERROR while trying to load Rcmdr for R on my MacBook Pro:

> 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.0/Resources/library/tcltk/libs/tcltk.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/tcltk/libs/tcltk.so
  Reason: image not found
Error: package or namespace load failed for ‘Rcmdr’

I have other problem on this machine related to the TclTk libraries, but I didn't get any help when I posted about troubles installing graphviz.

If someone could help me fix the TclTk library issue I would really appreciate it.

Thanks in advance.

Community
  • 1
  • 1
tipanverella
  • 3,477
  • 3
  • 25
  • 41
  • Looks like there is no file `/usr/local/lib/libtcl8.6.dylib`… – Donal Fellows Aug 31 '13 at 19:47
  • agreed. not in that dir. locate libtcl8.6.dylib /usr/local/Cellar/tcl-tk/8.6.0/lib/libtcl8.6.dylib – tipanverella Aug 31 '13 at 22:33
  • you marked as duplicate the older of the two questions??? @thomas could you help me understand how a question that was asked (and aswered) in 2013 is the duplicate of one that was asked in 2014?!?!?! – tipanverella Apr 29 '15 at 14:59

1 Answers1

5

Thank your @donal-fellows !

The solutions was to put symlinks to the libs where R expected them:

brew remove tcl-tk
brew -v install tcl-tk --with-tk
ln -s /usr/local/Cellar/tcl-tk/8.6.0/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib
ln -s /usr/local/Cellar/tcl-tk/8.6.0/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib

let us now hope that this fixes my graphviz issue!

tipanverella
  • 3,477
  • 3
  • 25
  • 41