一、Tcl安装
1、 下载:tcl8.4.20-src.tar.gz
http://www.tcl.tk/software/tcltk/downloadnow84.tml
2、解压缩源码包
tar xfvz tcl8.4.20-src.tar.gz
3、安装配置
cd tcl8.4.20/unix
./configure --prefix=/usr/local/tcl --enable-shared
make
make install
4、子目录unix下面的tclUnixPort.h 复制到generic中
cp tcl8.4.20/unix/tclUnixPort.h tcl8.4.20/generic/
二、expect安装
1、下载:http://sourceforge.net/projects/expect/
2、解压缩源码包
tar xzvf expect5.45.tar.gz
3、cd expect5.45
./configure --prefix=/usr/local/expect --with-tcl=/usr/local/tcl/lib --with-tclinclude=../tcl8.4.20/generic
4、 make
make install
ln -s /usr/local/tcl/bin/expect /usr/local/expect/bin/expect
5、创建链接到/bin下
ln -s /usr/local/expect/bin/expect /bin/expect