Linux安裝expect命令

第一種方式:

yum  install expect

第二種方式:

安裝Tcl:

下載源碼包:

http://www.tcl.tk/software/tcltk/downloadnow84.tml
http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.20-src.tar.gz

解壓編譯安裝:

tar -zxvf tcl8.4.20-src.tar.gz

cd tcl8.4.20/unix

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

make

make install

cp tclUnixPort.h ../generic/
安裝expect:

下載源碼包:

http://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz/download

解壓編譯安裝:

tar -zxvf expect5.45.tar.gz

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章