linux下安裝expect解決方案

來源:互聯網
上載者:User

需要兩個安裝程式

tcl8.4.13-src.tar.gz  下載:http://download.chinaunix.net/do ... rceID=22&site=1

expect-5.43.0.tar.gz    下載:http://download.chinaunix.net/do ... eID=2845&site=1


首先安裝tcl8.4.13

Tcl 的 configure 指令碼有一個語法錯誤,下面的命令可以糾正它:

sed -i "s/relid'/relid/" configure

編譯tcl

cd unix

./configure --prefix=/ixdba.net

make

make install

需要的內容都拷貝到/tools目錄,


安裝完畢完先不要刪除源碼,以會安裝expect還要用到


將/ixdba.net目錄export到環境變數,


接著,就是編譯expect了,解壓gz包就不說了


./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no


如果報

checking for Tcl private headers... checking for tclInt.h... no 

configure: error: Can't find Tcl private headers 


就再添加一個標頭檔目錄參數

--with-tclinclude=../tcl8.4.11/generic


指令碼運行正常,進行執行make進行編譯

make

編譯過程中未出現錯誤,執行安裝:

make install


編譯完成後會生在剛才tcl編譯時間產生的目錄/ixdba.net產生expect命令,

此時在命令列執行expect應該可以執行了!


下面就可以做expect的工作了!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.