[root@single ~]# uname -r
2.6.32-431.el6.x86_64
[root@single ~]# uname -a
Linux single 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

默认安装时,expect是不安装的。

[root@single ~]# which expect
/usr/bin/which: no expect in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@single ~]# yum install expect*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package expect.x86_64 0:5.44.1.15-5.el6_4 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: expect-5.44.1.15-5.el6_4.x86_64
--> Running transaction check
---> Package tcl.x86_64 1:8.5.7-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================
Package Arch Version Repository Size
==============================================================================
Installing:
expect x86_64 5.44.1.15-5.el6_4 rhel-source 256 k
Installing for dependencies:
tcl x86_64 1:8.5.7-6.el6 rhel-source 1.9 M

Transaction Summary
==============================================================================
Install 2 Package(s)

Total download size: 2.2 M
Installed size: 4.9 M
Is this ok [y/N]: y
Downloading Packages:
------------------------------------------------------------------------------
Total 2.1 MB/s | 2.2 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:tcl-8.5.7-6.el6.x86_64 1/2
Installing : expect-5.44.1.15-5.el6_4.x86_64 2/2
Verifying : expect-5.44.1.15-5.el6_4.x86_64 1/2
Verifying : 1:tcl-8.5.7-6.el6.x86_64 2/2

Installed:
expect.x86_64 0:5.44.1.15-5.el6_4

Dependency Installed:
tcl.x86_64 1:8.5.7-6.el6

Complete!
[root@single ~]#
[root@single ~]# which expect
/usr/bin/expect
[root@single ~]#