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.
Related Questions
- When (as root) I use -C to run Exim with an alternate configuration file, it gives an error about being unable to create a spool file when trying to run an autoreply transport. Why is this?
- Why am I receiving Run Application Error, "File Not Found:C:Program FilesMicrosoft DynamicsGPDRMSRS.exe..." when trying to print a SRS report?
- Why do I get the error Bad interpreter trying to run a shell file or an AGI?