linux环境下安装expect-5.43,有图佐证安装成功


博主本人安装的操作系统如图:




第一步下载所需文件tcl和expect:(下载目录/export/tools/)

wget http://heanet.dl.sourceforge.net/project/tcl/Tcl/8.4.19/tcl8.4.19-src.tar.gz

 wget http://down1.chinaunix.net/distfiles/expect-5.43.0.tar.gz


第二步解压并安装文件:

(1)解压

cd /export/tools/

tar -zxvf  tcl8.4.19-src.tar.gz

tar -zxvf  expect-5.43.0.tar.gz


(2)先安装tcl

cd /export/tools/tcl8.4.19/unix

./configure --prefix=/usr/tcl --enable-shared

 make 
 make install

 cp  /export/tools/tcl8.4.19/unix/tclUnixPort.h    /export/tools/tcl8.4.19/generic/


(3)安装expct 

cd  /export/tools/expect-5.43

 ./configure --prefix=/usr/expect --with-tcl=/usr/tcl/lib  --with-tclinclude=/export/tools/tcl8.4.19/generic     (tcl目录根据自己的实际情况)

 make 
 make install


(4)配置expect 命令,方便将来使用时敲expect就可以调用

vi  ~/.bash_profile

新增两行:

expect='/export/tools/expect-5.43/expect';
export export

保存退出。

生效配置  source ~/.bash_profile

成功!!!!!如图







  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值