I have a problem with a Tcl/Tk application, redet, and Ubuntu 18.04. I installed it in 17.04, using synaptic so that all its dependencies were pulled in. It continued to work in 17.10. After upgrading to 18.04 it failed to start with the following error messages.

Error in startup script: can't find package Itcl 3.4
    while executing
"package require Itcl 3.4"
    (file "/usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl" line 18)
    invoked from within
"source /usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl"
    ("package ifneeded Iwidgets 4.1.0" script)
    invoked from within
"package require Iwidgets"
    (file "/usr/bin/redet" line 27)

Although everything was unchanged, so I believe all dependencies were satisfied, I tried installing redet on a different machine with 18.04 installed using synaptic. All the same dependencies were pulled in, but when I tried to run redet I got the same error message. Googling, this problem appeared in the past on several message boards related to Tcl/Tk, but there is no obvious soution that I could understand. The only question I could find on AskUbuntu (Q: Problem to install fv tool) didn't have any responses.

  • 1
    sudo apt install itcl3 iwidgets4 – glenn jackman May 3 at 17:26
  • No, they are already installed, pulled in when I installed redet. – Richard Quint May 3 at 17:39
  • what does echo "puts [package req Itcl]" | tclsh output? – glenn jackman May 3 at 17:44
  • 1
    rquint@Maria-Agnesi:~$ echo "puts [package req Itcl]" | tclsh 3.4 It's the same on all machines. – Richard Quint May 3 at 19:30
  • 1
    Using synaptic to install, it pulls in the newest version of itcl3. As indicated in the answer below, 17.04 and 17.10 have a prior version installed. – Richard Quint May 3 at 22:48
up vote 2 down vote accepted

I can confirm this issue on clean installation of Ubuntu 18.04 LTS with installed just one redet package:

$ sudo apt-get install redet

$ redet 
Error in startup script: can't find package Itcl 3.4
    while executing
"package require Itcl 3.4"
    (file "/usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl" line 18)
    invoked from within
"source /usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl"
    ("package ifneeded Iwidgets 4.1.0" script)
    invoked from within
"package require Iwidgets"
    (file "/usr/bin/redet" line 27)

$ dpkg -S /usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl
iwidgets4: /usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl

$ dpkg -S /usr/bin/redet
redet: /usr/bin/redet

$ echo "puts [package req Itcl]" | tclsh
3.4

So I reported bug 1768973 to launchpad.


Quick and dirty work-around is to download package from Xenial, install it and pin:

cd ~/Downloads
wget http://mirrors.kernel.org/ubuntu/pool/universe/i/itcl3/itcl3_3.4.3-1_amd64.deb
sudo apt-get install ./itcl3_3.4.3-1_amd64.deb

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-itcl
Package: itcl3
Pin: version 3.4.3-1
Pin-Priority: 1337
EOF

After these actions redet is launched normally:

redet on Bionic

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.