离线安装expect
expect依赖tcl库
安装包:
https://files.cnblogs.com/files/tozh/tcl8.4.11-src.tar.gz
https://files.cnblogs.com/files/tozh/expect-5.43.0.tar.gz
我将两个压缩包传到了/opt/目录下
1,安装tcl
tar xf tcl8.4.11-src.tar.gz
cd tcl8.4.11/unix
./configure
make && make install
2,安装expect
tar xf expect-5.43.0.tar.gz
cd expect-5.43.0
./configure --with-tclinclude=/opt/tcl8.4.11/generic --with-tclconfig=/usr/local/lib/
make && make install
--------------------------------------------------------------------------------------------------------------------------------------------------------
参考:http://xstarcd.github.io/wiki/shell/expect_handbook.html