Why do I get the error 'Bad interpreter' trying to run a shell file or an AGI?

If you run a command file that is written in Perl, and the file does not seem to run at all unless it is launched manually with "perl filename.pl" it is very likely that you forgot to convert it from DOS format to UNIX. You usually get the error "bad interpreter" when running it manually.

To solve this problem, type dos2unix commandname - the file will be changed from DOS format to UNIX and will be immediately runnable by typing ./commandname

If this is not enough, make sure that the file is executable (chmod a+x commandname) and that the path of the Perl interpreter as specified in the first line is correct for your environment.

Permalink - Back to FAQs

QueueMetrics Training

Loway Logo

Copyright ©Loway 2019 · all rights reserved · Terms of service · Privacy policy

All trademarks, service marks, trade names, product names and logos appearing on the site are the property of their respective owners, including in some instances Loway. Any rights not expressly granted herein are reserved.

Facebook Twitter Linkedin Pinterest Google+ Tumblr Vimeo Youtube Slideshare RSS

Network Status: Network is OK