http://expect.sourceforge.net/
I've just tried this on a 16.04, but it should work on older versions of Ubuntu as well.
http://www.activestate.com/activetcl/downloads
Download and extract the files, then cd
into the extracted directory and run ./install.sh
(with root permissions).
Follow the installation instructions and put everything under the default directory (/opt
).
https://sourceforge.net/projects/expect/files/Expect/
Extract the contents into /opt
.
From the installation directory (example /opt/expect5.45/
), run the following commands:
$ sudo ./configure \
--with-tcl=/opt/ActiveTcl-8.6/lib/tcl8.6 \
--with-tclinclude=/opt/ActiveTcl-8.6/include/tcl8.6 \
--with-tk=/opt/ActiveTcl-8.6/lib/tcl8.6 \
--with-tkinclude=/opt/ActiveTcl-8.6/include/tcl8.6
$ sudo make && sudo make install
To have the final executable globally available, create a symlink for it:
$ sudo ln -s /opt/expect5.45/expect /usr/bin/expect
You need a c compiler in your system. I used gcc (apt-get install gcc if you don't have it previously)
Actually there are some mistakes in the ./configure command as some paths don't exist.
This is what I run (I picked /usr as base folder instead of /opt):
./configure --with-tcl=/usr/ActiveTcl-8.6/lib --with-tclinclude=/usr/ActiveTcl-8.6/include --with-tk=/usr/ActiveTcl-8.6/lib/tcl8.6 --with-tkinclude=/var/ActiveTcl-8.6/include
ActiveTcl-8.6/include folder doesn't have a tcl8.6 sub-folder
And in --with-tcl you have to provide the path to tclConfig.sh which is ActiveTcl-8.6/lib not ActiveTcl-8.6/lib/tcl8.6
Apart from this everything runs smoothly.
Thanks a lot