Skip to content

Telling tcltk where tcl is?

4 messages · Peter Dalgaard, Faheem Mitha, Bjørn-Helge Mevik

#
The installation of R I'm using (R 1.2.0 on Redhat Linux
(R-base-1.2.0-2.i386.rpm)) apparently expects to find tcl in
./share/tcl8.0, ./share/tcl8.0 or /usr/local/share/tcl8.0:
Error in firstlib(which.lib.loc, package) : 
	Can't find a usable init.tcl in the following directories: 
    ./share/tcl8.0 ./share/tcl8.0 /usr/local/share/tcl8.0

However, tcl is installed in /usr/lib/tcl8.0 on my machine.  Is there a way
to tell R or tcltk where tcl is located?

(I'm sorry if this is a faq -- I've gone through all documentation I've
found, but I still couldn't find out about it.)
#
Bj?rn-Helge Mevik <bhm at math.uio.no> writes:
It isn't. It's not supposed to happen...

Does your .rpm match your RedHat version? 

You might consider getting a recent version off of CRAN or compiling
from sources. It might also work to set the environment variable
TCL_LIBRARY to the proper location on your system.

In either case it would be good for us to know the origin of your
setup in case anyone else gets in trouble.
#
On 24 Mar 2001, Peter Dalgaard BSA wrote:

            
I have a problem as well, but my error message is different. I am using
SuSE 6.2, and R 1.2.1. I seem to have two versions of tcl installed, 7.6
and 8.0. I get the message
Error in firstlib(which.lib.loc, package) : 
	Tcl/Tk support is not available on this system
Error in library(tcltk) : .First.lib failed
I added TCL_LIBRARY=/usr/lib/tcl7.6/ and then /usr/lib/tcl8.0/ instead to
.Renviron, but it doesn't seem to make any difference.

SuSE tends to be fairly idiosyncratic about naming things, unfortunately.
Does R expect some things in tcl/tk to be named a certain way? If so,
what? I don't know if this is relevant, but the TCl shell script is called
tclsh8.0 (for the newer version) and tclsh7.6 (for the older version).

Thanks in advance.
                                    Sincerely, Faheem Mitha.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
1 day later
#
[Peter Dalgaard BSA]
Oh.  :-)
Redhat: version 6.1.
tcl and tk: version 8.0.5-30 (these came with Redhat 6.1)

The R rpm I believe I got from CRAN, and it should be built for Redhat 6.x.

10 $ rpm -q R-base -i
Name        : R-base                       Relocations: (not relocateable)
Version     : 1.2.0                             Vendor: (none)
Release     : 2                             Build Date: l?r 16-12-2000 18:04:54 CET
Install date: s?n 17-12-2000 11:56:10 CET      Build Host: xena.iarc.fr
Group       : Applications/Engineering      Source RPM: R-base-1.2.0-2.src.rpm
Size        : 13719631                         License: GPL
Packager    : Martyn Plummer <plummer at iarc.fr>
URL         : http://www.r-project.org
[...]
I will.  (I just have to decide whether to install the needed development
libraries or upgrade rpm. :-)
Setting TCL_LIBRARY to /usr/lib/tcl8.0 helped.