1

When attempting to run an updated docker container for my lab's research, I get an error within one of the packages used about a missing shell command, called "run". In particular, this is within the MIRTK package's DrawEM scripts, one of which can be found here: https://github.com/DevelopmentalImagingMCRI/MCRIBS/blob/master/MIRTK/MIRTK/Packages/DrawEM/scripts/preprocess.sh (line 41 is the first where the command is called: run mirtk convert-image T2/$subj.nii.gz N4/${subj}_rescaled.nii.gz -rescale 0 1000 -double)

This is strange to me considering our previous docker image and derived containers use the same packages, yet did not have this issue, and have the same dependencies installed. We use the bash shell for this.

I am not able to see this command or the corresponding man page on my system nor the docker container, but was able to find a man page online here: https://linux.die.net/man/1/run

In addition, this led me to some of the creator's mailing list conversations here: https://lkml.org/lkml/2001/12/10/226

Alongside a (broken) link to where their efforts on the tool were being updated: http://www.ccur.com/realtime/oss

Checking the WayBack Machine (https://archive.org) for the site, I did not see a way for me to get those old packages, or an alternate link.

In addition, the only other thread I've found online even alluding to this issue is: https://www.linuxquestions.org/questions/linux-newbie-8/bash-run-command-not-found-316132/

In which a new user mistakenly believes that the standard process for running commands on Linux is with "run", and a couple of users explain how this is unnecessary, and one even states that there is in fact no such command.

Finally, searching for available versions of this tool to download via apt-cache search run gives many tools with "run" in their name or description, but no base run command.

I do not consider myself a Linux newbie, but this really has me scratching my head. Not in any small part due to the sparse references to this tool I can find in my research, and the fact that searching for keywords such as "bash run command," "bash run not found", "run command not found" etc. give a large breadth of unrelated queries. Furthermore, support for the particular packages we are using is very limited.

If anyone knows of a way to manually install/download this tool, or to tell my container/system to recognize it, or perhaps an alternative workaround/solution I am not thinking of, help would be appreciated!

Thanks

9
  • On a (very) quick look, since they're adding $FSLDIR to $PATH, perhaps this run utility is expected to be present in $FSLDIR but got moved or removed?
    – Jeff Schaller
    Mar 16, 2022 at 16:58
  • Possibly a red herring, but run is defined as a function here: github.com/DevelopmentalImagingMCRI/MCRIBS/blob/master/MIRTK/…
    – Jeff Schaller
    Mar 16, 2022 at 17:05
  • (1) I suspect that your links (die.net, lkml.org and linuxquestions.org) are really irrelevant to your question.  (2) You mention “our previous docker image”.  Do you still have access to a system where this works, and can you do forensics on it? Mar 16, 2022 at 17:08
  • @JeffSchaller: I guess that that’s a green herring (?). My first thought when I looked at that preprocess.sh script was that run was probably a shell function — good job, finding it! Mar 16, 2022 at 17:08
  • @JeffSchaller That is a great catch, looking into if there is a way for me to inform the calls to use that definition of run from MIRTK now. Could very well be a path issue as you state. Mar 16, 2022 at 18:44

1 Answer 1

1

Thanks to @JeffSchaller and @G-ManSays'ReinstateMonica':

I was able to discover that this issue was being caused by a lack of separate definitions of the bash function "run" defined in the individual subscripts used by the tool itself. It appears that the build we had received was missing those definitions from the scripts (hence "command: run not found"), and so I added them back in and was able to continue onwards with testing. I figured this out by referring to the previous builds of the tool we used and seeing that those previously included definitions were at one point present, but were removed. I am receiving issues now with some other missing tools/paths, but am working through it well enough through debugging the process. The issue this thread was started for, however, is remedied!

For those in the future: check for within-script definitions of bash functions which you otherwise may miss/overlook.

You must log in to answer this question.

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