Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TclTk library issue while install Rcmdr package on MacBookPro [duplicate]

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.

like image 692
tipanverella Avatar asked Aug 31 '13 17:08

tipanverella


1 Answers

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!

like image 96
tipanverella Avatar answered Nov 19 '22 07:11

tipanverella