ksh脚本执行报错 /bin/ksh: bad interpreter

执行命令 : db2_kill 报错:-bash: /home/db2inst1/sqllib/bin/db2_kill: /bin/ksh: bad interpreter: 没有那个文件或目录
一般是由于Linux上未安装ksh引起的,确认该目录下是否有ksh:ls /bin/ksh
解决方法如下:
如果联网的话直接yum安装:yum install ksh

Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

未联网找rpm包离线安装 ,打开http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
在这里插入图片描述
ksh安装包下载:http://mirrors.aliyun.com/centos/6.10/os/x86_64/Packages/
在这里插入图片描述
然后安装ksh:rpm -ivh ksh-20120801-37.el6_9.x86_64.rpm
在这里插入图片描述
最后 ksh脚本可以执行了。

发布了52 篇原创文章 · 获赞 7 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/hyfstyle/article/details/99413237
ksh