记录一下ubuntu安装tcl&expect

本文档介绍了在Ubuntu上如何手动安装TCL和EXPECT,包括下载源码、配置、编译和安装步骤。EXPECT安装依赖TCL环境,通过配置参数解决依赖。安装完成后,展示了EXPECT的基本使用方法,如发送和接收字符串,以及在多分支模式下的交互应用,适用于自动化测试和SSH登录等场景。

发现只有rpm包,
in CentOs:
#yum install tcl
#yum install expect
#yum install expect-devel
ubuntu需要自己下载源码安装。

源码地址

TCL: http://www.tcl.tk/software/tcltk/downloadnow84.tml
expect: http://sourceforge.net/projects/expect/

(一)总揽

 1172  shutdown now
 1173  cat /proc/version
 1174  cp tcl8420-src.zip /usr/local/src/
 1175  cp expect5.45.3.tar.gz /usr/local/src/
 1176  cd /usr/local/src/
 1177  ls
 1178  unzip tcl8420-src.zip 
 1179  ls
 1180  cd tcl8.4.20/unix/
 1181  ls
 1182  ./configure
 1183  make
 1184  make install
 1185  cd ../
 1186  ls
 1187  cd ..
 1188  ls
 1189  tar -xvzf expect5.45.3.tar.gz 
 1190  ls
 1191  cd expect5.45.3/
 1192  ls
 1193  ./configure --with-tclinclude=/usr/local/src/tcl8.4.20/generic --with-tclconfig=/usr/local/lib
 1194  make && make install
 1195  expect 
 1196  which  expect
 1197  whereis expect
 1198  ln -s /usr/local/bin/expect /usr/bin/expect
 1199  whereis expect
 1200  which  
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值