[Pkg-tcltk-devel] Bug#889810: tk: 'wish' gives console error message; tclsh can't find package Tk

tomas at tuxteam.de tomas at tuxteam.de
Wed Feb 7 10:31:56 UTC 2018

Hash: SHA1

On Wed, Feb 07, 2018 at 09:35:26AM +0000, Jasper Taylor wrote:
> Package: tk
> Version: 8.6.0+9
> Severity: important
> Dear Maintainer,
> I found I could not run my Tk-based application. I was starting it with a tclsh
> script which then executed "package require Tk" and this command was raising an
> error: "Can't find package Tk".
> When running 'wish' from the command line a console error message appears as
> follows:
> >application-specific initialization failed: Can't find a usable tk.tcl in the
> following directories:
> >    /usr/local/lib/tcl8.6/tk8.6 /usr/local/lib/tk8.6 /usr/lib/>tk8.6
> /usr/lib/tk8.6 /lib/tk8.6 /usr/library
> >
> >
> >
> >This probably means that tk wasn't installed properly.
> but Wish then appears to start normally.

Hm. This looks a bit strange. As if the tclsh you were running
didn't belong to the package.

Could you try, in a shell (best the same one you would start
your application from) to issue

  which tclsh

just to make sure?

Also, I'd check the value of the $auto_path variable on your tclsh:

  tomas at trotzki:~$ tclsh
  tclsh8.6 [~]puts $auto_path

(line wrap added to aid readability). That's more or less how it's supposed
to look for a Debian-distributed tcl. Given your error message above, the
/usr/share paths seem to be missing (and that's where the distributed
tk.tcl lives), so I suspect other forces to be at work here. Either a
homegrown tcl, or some homegrown config are good candidates for that.

- -- tomás
Version: GnuPG v1.4.12 (GNU/Linux)


More information about the Pkg-tcltk-devel mailing list