I have installed ubuntu alongside my windows 10 computer using the Windows Subsystem for Linux. I have successfully installed afni and the afni commands. However, any time I attempt to execute an afni command I receive an error that the command can’t be found.
DESKTOP-U4H41O9:~> ./3dcalc
./3dcalc: Command not found.
However, as you can see below my computer does have the afni command 3dcalc?
DESKTOP-U4H41O9:/mnt/e/scripts/scripts_home> which 3dcalc
/home/daniel/abin/3dcalc
Also when trying to execute a .sh file for a script I made that works fine on the mac we have in the lab I receive the error message…
DESKTOP-U4H41O9:/mnt/e/scripts/scripts_home> ./dtifit.sh
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
complete: Command not found.
Word too long.
To be sure, what is the output from simply “3dcalc”, without the ./?
You will generally not run AFNI commands via ‘./’, as that applies
to an executable (script?) sitting in your current directory.
Hi Daniel,
I’m getting a similar error, also running Ubuntu 18.04 on a Windows 10 laptop. Not sure why it is unable to access commands that are in the /abin directory.
Were you ever able to resolve this issue, and if so, what worked for you?
Thank you,
Claudia
That should include your home+abin; if not, then the AFNI binary directory hasn’t been added to your path.
Note that if you have just done the setup, you might need to open a new terminal (or source your shell’s RC file) for the change to take effect.
Try typing
echo $0
to see what shell you are using.
If the result of that is “bash” or “-bash”, then type:
source ~/.bashrc
and now see if typing “which afni” produces a result (meaning that your AFNI binary directory is in your path.
If the result of “echo $0” is “tcsh” or “-tcsh”, then type:
source ~/.cshrc
… and see now if “which afni” produces a result.
–pt
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.