expect安装
- 技术分享
- 2024-01-23
- 人已阅读
expect安装
CentOS-7-x86_64-Minimal-1804.iso
1. 安装tcl
1.1. 安装依赖
yum install -y gcc
1.2. 上传tcl8.4.11-src.tar.gz到/root并解压
1.3. 编译安装
cd /root/tcl8.4.11/unix/
./configure --prefix=/usr/tcl --enable-shared
sudo make
sudo make install
ln -s /usr/tcl/bin/tclsh8.4 /usr/bin/tclsh
1.4. 复制tclUnixPort.h到
cp /root/tcl8.4.11/unix/tclUnixPort.h /root/tcl8.4.11/generic/tclUnixPort.h
备注:暂时不要删除tcl源代码,因为expect的安装过程还需要用
1.5. 验证
上传helloWorld.tcl到/root目录下
tclsh helloWorld.tcl
1. 安装expect
1.1. 上传expect5.45.tar.gz到/root目录下并解压
1.2. 编译安装
cd /root/expect5.45
./configure --prefix=/usr/expect --with-tcl=/usr/tcl/lib --with-tclinclude=/root/tcl8.4.11/generic
sudo make
sudo make install
ln -s /usr/tcl/bin/expect /usr/bin/expect
1.3. 测试
星兔博文是国内知名的垂直网站之一,我们一直致力于提供新闻资讯,时事评论,经典小说等文章。