[R] Installing R on Red Hat Linux, Tcl/Tk

James Wettenhall wettenhall at wehi.edu.au
Fri Sep 5 14:13:13 CEST 2003


Hi,

I've been trying to install R on Red Hat Linux 9 for some
potential users of my R/TclTk application.  I tried using the 
rpm for R 1.7.1 for Red Hat Linux 9.  It told me that I needed:
libtcl8.3.so
so I looked for a binary release of Tcl 8.3.x on 
http://www.tcl.tk/software/tcltk/8.3.html
but found that the link to the Tcl 8.3.x binaries pointed to 
ActiveTcl 8.4.x . I couldn't see the old 8.3.x binaries 
anywhere.  ActiveTcl is a nice easy way to get the extensions 
like Tktable, but it seemed to be the wrong version.

I tried building tcl and tk 8.3 from source.  tcl was built 
succesfully and installed in /usr/local/lib/tcl8.3 but I wasn't 
able to build tk: errors like "foo has been defined previously"

Then I tried installing tcl and tk from the Red Hat CD
(using rpms).  Then when I installed R 1.7.1 from the rpm it 
seemed to work, except that:
> library(tcltk)
couldn't find a usable tk.tcl and it seemed to be 
looking in /usr/local/lib/tk8.3 whereas the rpms from the Red 
Hat CD were installed elsewhere (/usr/share/ I think) and 
rpm -i --prefix
didn't work.  (tk was "not relocatable".)

Things started to work better after I copied /usr/share/tk8.3 to 
/usr/local/lib/tk8.3/ (but I initially forgot to do the same 
with tcl so was probably using the version I built from source).

So now library(tcltk) seems to be working, but I'm getting 
segmentation faults if I try to use Tktable, after doing 
addTclPath("/usr/local/ActiveTcl/lib"). (Installing ActiveTcl 
seemed easier than building Tcl/Tk extensions from source.)

So maybe I need to build Tktable --with tcl8.3 and tk8.3.

I expect to be able to sort this out pretty soon, but I'm just 
wondering whether the R/Linux gurus out there have any general 
advice about whether it is better to use rpms or install from 
source and whether anyone has an rpm for R 1.7.x configured to 
work with libtcl8.4.so (available from ActiveTcl).   

Regards,
James




More information about the R-help mailing list