Skip to content
Prev 86248 / 398528 Next

install.packages() failed

I use Mac. I installed R with the download from R-project, so R is in /usr/bin/R.  
My TclTk library is installed via fink (although I don't remember I intentionally 
installed it) so libtk8.4.dylib is in /sw/lib.

I tried to install the HDF5 package from within R:
and it failed like this
-------
Loading Tcl/Tk interface ... Error in dyn.load(x, as.logical(local), as.logical(now)) 
: 
        unable to load shared library '/Library/Frameworks/R.framework/
Resources/library/tcltk/libs/tcltk.so':
  dlcompat: dyld: /Library/Frameworks/R.framework/Resources/bin/exec/R 
can't open library: /usr/local/lib/libtk8.4.dylib  (No such file or directory, errno 
= 2)
Error: .onLoad failed in 'loadNamespace' for 'tcltk'
-------

Apparently R looks for libtk8.4.dylib in /usr/local/lib and doesn't know it's in /
sw/lib. How can I tell R about this?

Also, I tried installing the downloaded source with
and it failed because the 'configure' script of the package failed. Anybody had 
experience with this? If I can install with 'R CMD INSTALL', that's also good 
enough.

Thanks.
Zepu