[R-sig-Debian] tk not installed properly

Dirk Eddelbuettel edd at debian.org
Fri Nov 2 18:54:45 CET 2007


Tyler,

On 2 November 2007 at 14:10, Tyler Smith wrote:
| Hi,
| 
| I'm getting the following error:
| 
| > install.packages()
| --- Please select a CRAN mirror for use in this session ---
| Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable tk.tcl in the following directories: 
|     /usr/share/tcltk/tcl8.4/tk8.4 ./lib/tk8.4 /usr/local/lib/tcltk/tk8.4 /usr/local/share/tcltk/tk8.4 /usr/lib/tcltk/tk8.4 /usr/share/tcltk/tk8.4 ./library ./tk8.4.16/library
| 

Ick, I can confirm that using 'R --vanilla' (package 2.6.0-3 on testing) and
then calling install.packages().  I will have to look into that.  The weird
thing is that capabilities() lists tcltk as TRUE. Hm.


| This probably means that tk wasn't installed properly.
| 
| Error: .onLoad failed in 'loadNamespace' for 'tcltk'
| >
| 
| This has worked before, probably last used successfully a couple of
| weeks ago. I'm running Lenny, interacting with R version 2.5.1
| (2007-06-27) using Emacs22 and ESS. I downloaded and installed Emacs22
| from GNU directly before it was in the Debian repository, and
| hand-installed ESS according to standard directions. R was installed
| via the Debian repositories. Up until today I had no problems with
| tcltk.
| 
| I have tk8.4.16-1 and tcl8.4.16-3 installed via aptitude, satisfying
| the dependencies of r-base-core. I just installed tk8.5 and tcl8.5,
| but the problem remains.
| 
| Any ideas?

Not immediately.  To be able to load packages, skip the tcl/tk menu step. One
way is to put something like this intp ~/.Renviron:

options("repos"=c(CRAN="http://cran.us.r-project.org", Bioc="http://www.bioconductor.org", Omegahat="http://www.omegahat.org/R"))

With options(repos) set, it won't run the selector that failed.  I'll have to
see why tcl is broken.  

[...]


Ok, step one:

edd at ron:~> locate tk.tcl
/usr/lib/R/library/tcltk/exec/util-tk.tcl
/usr/lib/tk8.4/safetk.tcl
/usr/lib/tk8.4/tk.tcl
edd at ron:~> 

so it is there.  



Step two, noticing that there is a newer tk8.4 in unstale, and looking at 
http://changelog.debian.net/tk8.4, I see 

tk8.4 (8.4.16-2) unstable; urgency=low

  * Removed TK_INC_DIR from tkConfig.sh and tcl.m4.
  * Added -fno-unit-at-a-time option to match tcl8.4 build options.
  * Moved architecture independent files from /usr/lib/tk8.4 to
    /usr/share/tcltk/tk8.4. To keep backward compatibility tkConfig.sh is
    linked into /usr/lib/tk8.4 directory.
  * Fixed bug with update-alternatives in prerm script.
  * Removed conflicts with tcl and providing tcl-dev packages from
    debian/control to prepare binary packages for default tcl and tcl-dev.
  * Added Homepage field to debian/control.
  * Fixed segfault in case if only scalable fonts are available and the best
    scored font is infeasible (closes: #444546).
  * Rearranged conflicts of tk8.4-doc package because of planned adoption of
    real tk-doc package.

 -- Sergei Golovan <sgolovan at debian.org>  Fri, 19 Oct 2007 16:08:07 +0400

and the third item is a winner as /usr/share/tcltk/tk8.4 is one of the
searched directories, and indeed after


Step 3:  Running 'wajig install tk8.4/unstable' (I really like wajig as
a consistent wrapper around dpkg, apt-*, dselect, aptitude, ...), the example
works.


Summary:  tk8.4 in testing is broken, R needs an explicit Depends on 

	tk8.4 (>= 8.4.16-2)

Thanks for bringing this up!

Thanks, Dirk

-- 
Three out of two people have difficulties with fractions.



More information about the R-SIG-Debian mailing list