--> expect的主页:http://expect.nist.gov/
最新稳定版5.43.0的下载地址:http://expect.nist.gov/expect.tar.gz
expect依赖于tcl/tk,因此在安装expect之前先安装tcl/tk。
tcl/tk8.4.16的下载面页:
http://www.tcl.tk/software/tcltk/downloadnow84.html
软件包的下载地址:
http://prdownloads.sourceforge.net/tcl/tcl8.4.16-src.tar.gz
http://prdownloads.sourceforge.net/tcl/tk8.4.16-src.tar.gz
第一步,安装tcl
[root@supersun.biz download]#cd tcl8.4.16/unix/
./configure
make
make install
安装之后不要删除源码包,在安装expect时需要tcl的头文件。
第二步,安装tk
[root@supersun.biz download]#cd tk8.4.16/unix/
./configure
make
make install
第三步,安装expect
在不提供参数的情况下执行configure报错:
checking for Tcl private headers... checking for tclInt.h... no
configure: error: Can't find Tcl private headers
再次运行configure脚本,并指定tcl的头文件所在目录:
[root@supersun.biz expect-5.43]#./configure --with-tclinclude=../tcl8.4.16/generic
脚本运行正常,进行执行make进行编译
make
编译过程中未出现错误,执行安装:
make install

发表评论