Trying to execute a run.pl file
Solution 1
Bash will always try to interpret scripts / text files as a sequence of Bash commands, unless the script / text file itself has a shebang at the start of the file describing which executable has to be run in order to interpret it; either add a shebang at the start of the file explicitly telling Bash to run the script using Perl:
#!/usr/bin/env perl
Or run the script using Perl:
perl ../OpenDroneMap/run.pl
To not follow a reverse SCITE approach (i.e. to not edit answers posted earlier based on other users' answers posted later), since this is now the accepted answer I'll edit in part of what OleksDovz said in its answer, which is: if you're running the script using ../OpenDroneMap/run.pl
, make sure that the script has both a shebang at the start of the file and the executable flag set for your user; if you're the owner of the file run:
chmod u+x ../OpenDroneMap/run.pl
Solution 2
check if shebang exists in first line, Like "#!/usr/bin/perl" and add to this file +x bit:
chmod a+x ../OpenDroneMap/run.pl
or just use perl for script
perl ../OpenDroneMap/run.pl
After that you can run
Related videos on Youtube
![Leith Hawkins](https://lh5.googleusercontent.com/-91V9rjnY_Zc/AAAAAAAAAAI/AAAAAAAABE0/8bTvoWWIWno/photo.jpg?sz=256)
Comments
-
Leith Hawkins almost 2 years
I am trying to run a run.pl file form the OpenDroneMap directory using the command
../OpenDroneMap/run.pl
from within the Photos directory however I keep getting a Bash error.Would there be any reason I can't run this command?
-
Leith Hawkins almost 9 yearsI am getting there - or at least im getting further down the trail. After I run the perl script. using perl ../OpenDroneMap/run.pl i get an error message: , or } expected while parsing object /hash at character offset 11081 (before " " Mantis i23" : 45.00\n...") at ../OpenDroneMap/run.pl line 36, <$fh> chunk1. I am assuming it means that its tried to run the perl file but has found an error do I need to install perl on the server or is it nativly installed as a dependancy?
-
kos almost 9 yearsThat's an issue with the Perl script, not with running the script itself, and it deserves another question (not here, on Stack Overflow as it would be more of a programming question) as this is not a forum, so we're not really following up on users' issues; please accept one of the answers below and feel feel free to drop a comment under my answer with a link to your Stack Overflow question so that I can take a look at it
-
Leith Hawkins almost 9 years
-