项目场景:
linux 执行脚本后提示
/usr/bin/expect: error while loading shared libraries: libexpect5.42.so: cannot open shared object file: No such file or directory
问题描述:
单独执行expect也报错
$ expect file userName ...
/usr/bin/expect: error while loading shared libraries: libexpect5.42.so: cannot open shared object file: No such file or directory
原因分析:
这是找不到共享库的错误,检查后未显示安装软件
$ rpm -qa|grep expect
解决方案:
根据libexpect5.42.so找到expect的5.42版本的安装包进行重新安装即可
$ rpm -ivh expect-5.42.1-1.i386.rpm