expect安装

1.使用yum安装expect,版本为5.44.1.15,tcl依赖包版本8.5.7
2.源代码下载

http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz

http://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz/download
3.源代码安装
(1)安装tcl
tcl源代码根目录的子目录unix
./configure --prefix=/usr/local/tcl --enable-shared
make
make install(使用root权限)
复制tclUnixPort.h到generic,供给expect安装使用
(2)安装expect
./configure --prefix=/usr/local/expect --with-tcl=/usr/local/tcl/lib --with-tclinclude=tcl源代码路径/generic
make
make install(使用root权限)
(3)生成链接

ln -s /usr/local/tcl/bin/expect /usr/local/expect/bin/expect
(4)生成到/usr/bin的链接

ln -s /usr/local/expect/bin/expect /usr/bin/expect

原文地址:https://www.cnblogs.com/AI001/p/3368900.html