Linux|Linux expect非root用户安装

问题
bash shell使用expect脚本,需要在非root用户条件下安装
方案
1、下载tcl、expect安装包
2、将两个安装包放置到自己目录下/user/bin/expect/local/
3、解压
4、创建/user/bin/expect/local/目录,进入tcl8.4.11/unix

cd tcl8.4.11/unix

修改 configure,将 /usr/local全部替换成/user/bin/expect/local/
5、执行
./configure

6、修改Makefile,将/usr/local全部替换成/user/bin/expect/local/
7、执行
make make install

8、回到/user/bin/xukf/expect ,进入expect-5.43.0
cd expect-5.43.0

修改 configure,将 /usr/local全部替换成/user/bin/expect/local/
9、执行
./configure --with-tclinclude=/user/bin/expect/tcl8.4.11/generic --with-tclconfig=/user/bin/expect/local/lib/

10、修改Makefile,将/usr/local全部替换成/user/bin/expect/local/
11、执行
make make install

【Linux|Linux expect非root用户安装】12、测试expect是否安装成功
使用绝对路径:/user/bin/expect/expect-5.43

    推荐阅读