Getting this error when running recon-all- Freesurfer

Hello,

I am running freesurfer in a cloud-based linux system and installed it in a directory.

I have to manually import tcsh using module load tcsh
this enables me to run tcsh commands.
But when I run:

tcsh recon-all -s subj_id -i path/to/T1.nii.gz -all

I get this error:

fs-check-version --s 4219538 --o /tmp/SLURM_24801251/tmp.8x8O5O
fs-check-version: No such file or directory.
recon-all: version check failed
fs-check-version --s 4219538 --o /tmp/SLURM_24801251/tmp.8x8O5O

When I only run fs-check-version, it works, as a subject is created in the subjects directory and I don’t get any errors, but when recon-all calls fs-check-version, I get the error.
Any solutions I can try?

Thanks

If you’re running tcsh recon-all, then likely your PATH environment variable is not pointing to your FreeSurfer bin/ directory.

Add the following to your .bashrc or .bash_profile:

export FREESURFER_HOME=/path/to/freesurfer/directory
source $FREESURFER_HOME/SetUpFreeSurfer.sh

Reload your shell (or source ~/.bashrc) and then you should be able to run recon-all from any directory.

Hey @effigies ,
Thanks for your help, it seems to be running now, but I am having another error now. After running the recon-all command, I get this output:

tcsh fs-check-version --s 2512155V --o /tmp/SLURM_24862957/tmp.dsBmJz
Sat Aug 10 15:07:17 PDT 2024

setenv SUBJECTS_DIR /project/millstei_783/prajwalg/freesurfer/subjects
cd /project/millstei_783/prajwalg/freesurfer/bin
fs-check-version --s 2512155V --o /tmp/SLURM_24862957/tmp.dsBmJz
-rwxrwxr-x. 1 prajwalg millstei_783 18566 Aug  7 18:08 fs-check-version

freesurfer-linux-centos7_x86_64-7.4.1-20230613-7eb8460
$Id$
Linux e17-15.hpc.usc.edu 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
pid 22290
Current FS Version freesurfer-linux-centos7_x86_64-7.4.1-20230613-7eb8460
Subject does not have a bstampfile, copying /project/millstei_783/prajwalg/freesurfer/build-stamp.txt
Subject FS Version: freesurfer-linux-centos7_x86_64-7.4.1-20230613-7eb8460
No constraints on version because REQ=UnSet and FsVerFile=NotThere
#@#% fs-check-version match = 1
fs-check-version Done
INFO: SUBJECTS_DIR is /project/millstei_783/prajwalg/freesurfer/subjects
Actual FREESURFER_HOME /project/millstei_783/prajwalg/freesurfer
Linux e17-15.hpc.usc.edu 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
mri_motion_correct.fsl: Command not found.
cp: cannot stat '/project/millstei_783/prajwalg/freesurfer/subjects/2512155V/recon-all': No such file or directory
/project/millstei_783/prajwalg/freesurfer/subjects/2512155V

 mri_convert /project/millstei_783/prajwalg/subjects/2512155V/2512155V-20060314_T1.nii.gz /project/millstei_783/prajwalg/freesurfer/subjects/2512155V/mri/orig/001.mgz 

mri_convert /project/millstei_783/prajwalg/subjects/2512155V/2512155V-20060314_T1.nii.gz /project/millstei_783/prajwalg/freesurfer/subjects/2512155V/mri/orig/001.mgz 
reading from /project/millstei_783/prajwalg/subjects/2512155V/2512155V-20060314_T1.nii.gz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, -1, 0)
k_ras = (0, 0, 1)
writing to /project/millstei_783/prajwalg/freesurfer/subjects/2512155V/mri/orig/001.mgz...
#--------------------------------------------
#@# MotionCor Sat Aug 10 15:07:33 PDT 2024
Found 1 runs
/project/millstei_783/prajwalg/freesurfer/subjects/2512155V/mri/orig/001.mgz
Checking for (invalid) multi-frame inputs...
UpdateNeeded: Command not found.
if: Expression Syntax.

After running this, when I checked the folder where this transformation is supposed to happen, there was no file.
Meaning, in this directory: /project/millstei_783/prajwalg/freesurfer/subjects/2512155V/mri/transforms/bak,
there is no T1 file

How can I solve it?
Thanks!