3

I copied some files to Ubuntu (running on VirtualBox). Trying to open the said copied files and get an error. I'm not entirely sure how the file directory system works, but I used cp command to copy one of the files. Is (and other files that were just copied into the folder manually) shows up in the right folder with ls command. But when I try to execute the file, I get the following error:

qiime@qiime-VirtualBox:~$ usr/bin/varscore_pipeline -bo Desktop/Shared_Folder/VARSCORE/C_albicans.fasta Desktop/Shared_Folder/VARSCORE/tmp/poo.csv
bash: usr/bin/varscore_pipeline: usr/bin/python2.6: bad interpreter: No such file or directory

When I run the ls /usr/bin/ command I can see the file varscore_pipeline in there, so I'm not sure what is wrong.

2 Answers 2

4

varscore_pipeline is a Python script. It begins with a shebang line that points to the interpreter that must execute the script. The path to the interpreter is usr/bin/python2.6, and this file doesn't exist.

First, that line is wrong. The shebang line must have an absolute path. Change #!usr/bin/python2.6 to #!/usr/bin/python2.6.

Depending on your version of Ubuntu, you may or may not have /usr/bin/python2.6. If you only have a later version such as 2.7, change the shebang line to #!/usr/bin/python2. It is highly unlikely that the program would work with 2.6 but not 2.7. Python 2.x versions are upward compatible. (But don't change to /usr/bin/python3, there are incompatibilities between Python 2 and Python 3.)

See /bin/sh: ./check-dependencies.pl: not found — but check-dependencies.pl exists! for more explanations.

0

Check if the file in question does not have CRLF chars (visible as ^M in vi), that is, DOS-style line end char sequences. Sometimes they are not visible in various terminals/editors, while bash tries to run a script with interpreter like /bin/bash^M, which doesn't exist, hence the error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .