chr*_*ris 30 linux perl interpreter ubuntu-9.04
对我来说这是一个新的:这个错误表示什么?
/usr/bin/perl: bad interpreter: Text file busy
Run Code Online (Sandbox Code Playgroud)
当时有几个磁盘密集型进程在运行,但我以前从未见过这个消息 - 事实上,这是我第一次记得在尝试运行Perl脚本时遇到错误.经过几秒钟的等待,我能够运行它,并且从那时起就没有看到这个问题了,但对此有一个解释会很好.
运行Ubuntu 9.04,文件系统是ext3.
发生这种情况是因为脚本文件是打开的,可能是由于尚未终止的恶意进程.
解决方案:检查仍在访问文件的进程,并终止它.
例如:
# /root/wordpress_plugin_updater/updater.pl --wp-path=/var/www/virtual/joel.co.in/drjoel.in/htdocs
-bash: /root/wordpress_plugin_updater/updater.pl: /root/perl/bin/perl: bad interpreter: Text file busy
Run Code Online (Sandbox Code Playgroud)
lsof在脚本名称上运行(列出打开文件命令):
# lsof | grep updater.pl
sftp-serv 4416 root 3r REG 144,103 11043 33046751 /root/wordpress_plugin_updater/updater.pl
Run Code Online (Sandbox Code Playgroud)
通过PID终止进程:
kill -9 4416
Run Code Online (Sandbox Code Playgroud)
现在尝试再次运行脚本.它现在有效.
# /root/wordpress_plugin_updater/updater.pl --wp-path=/www/htdocs
Wordpress Plugin Updater script v3.0.1.0.
Processing 24 plugins from
Run Code Online (Sandbox Code Playgroud)