2

I downloaded the source for expect5.45, and am attempting to install it. tclsh is on the system at /usr/bin/tclsh, but I'm not sure if that means the machine also has "tcl" installed?

The instructions for Expect state:

By default, the Tcl source directory is assumed to be in the same directory as the Expect source directory. For example, in this listing, Expect and Tcl are both stored in /usr/local/src:

    /usr/local/src/tcl8.0           (actual version may be different)
    /usr/local/src/expect-5.24      (actual version may be different)

If Tcl is stored elsewhere, the easiest way to deal with this is to create a symbolic link to its real directory. For example, from the Expect directory, type:

    ln -s /some/where/else/src/tcl8.0 ..

I have tried making that symbolic link multiple times in various location, but I am linking to tclsh, not tcl, which I think is the problem. Is there a difference between these two? I can run tcl scripts fine on the machine as it is.

When running "./configure" the following error happens:

checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions

(To be clear, I cannot put expect in the 'normal' directories because I don't have write access to them. It will go into my personal home directory. And I don't have permission to use sudo apt-get. This is an Ubuntu 14.04 machine.)

  • 1
    If you need/want tcl/expect and it's not your machine, perhaps you'd be better asking the owner to install it for you. At least that way it's going to get kept up-to-date as part of the normal package management. – roaima Nov 20 '15 at 17:06
  • also, unless you have a very specific requirement for tcl and expect and already know those languages, you're probably better off using either python and pexpect or perl and Expect.pm. Both provide the same expect-like features as expect but with more generally useful languages. tcl isn't quite dead, but it's not far from it. both python and perl will amost certainly be installed already and both support installing library modules (such as pexpect and Expect.pm) under your home dir, so no root access is required. – cas Nov 20 '15 at 20:15
  • I will look into those options, thanks. – user144150 Nov 20 '15 at 21:14
  • If pip is installed you can do pip install --user pexpect to install it without root privileges. – Ortomala Lokni Nov 26 '15 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy