您的位置:首页 > 其它

expect安装

2016-01-15 10:11 134 查看
安装环境是Red Hat Enterprise Linux Server release 6.6

先下载tcl的安装包,网址为http://www.tcl.tk/software/tcltk/downloadnow84.html

tar xfvz tcl8.4.20-src.tar.gz
cd tcl8.4.20/unix/
./configure --prefix=/usr/tcl --enable-shared
make
make install


安装完成

安装完毕以后,进入tcl源代码的根目录,把子目录unix下面的tclUnixPort.h copy到子目录generic中。

cd ..
cp unix/tclUnixPort.h generic/


下载expect安装包,网址为http://sourceforge.net/projects/expect/

2.解压缩源码包

tar xzvf expect5.45.tar.gz


3.安装配置

cd expect5.45/
./configure --prefix=/usr/expect --with-tcl=/usr/tcl/lib --with-tclinclude=../tcl8.4.20/generic
make
make install
ln -s /usr/tcl/bin/expect /usr/expect/bin/expect


配置参数的意思是:

· –with-tcl=/usr/tcl/lib :(我的环境中是/usr/local/lib) 确保配置脚本找到临时工具目录中的Tcl ,我们不希望它使用主系统中可能存在的tcl.

· –with-x=no : 告诉配置脚本,不要查找 Tk (Tcl 的 GUI 组件) 或 X 窗口系统库,这两个都有可能存在于主系统中。

· -with-tclinclude :帮助脚本找到所需要的tcl 头文件。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: