Hi Hossein,
The > that you’re including in front of your commands is not supposed to be there. The verbatim commands should be:
export FREESURFER_HOME=/Applications/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.sh
best Andrew
From: freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Hossein Shooli h.shooly@gmail.com Reply-To: FS Help freesurfer@nmr.mgh.harvard.edu Date: Wednesday, April 1, 2020 at 4:16 AM To: FS Help freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Setup & Configuration Error
External Email - Use Caution
Hello FreeSurfer Development Team, I have just install the FreeSurfer (freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c) on my mac Catalina OS (10.15.2). The installation path was set as default (/Application/freesurfer). Then, in the Setup & Configuration step I have faced some troubles that I'm in need to fix it. In this step the first line " $> export FREESURFER_HOME=/Applications/freesurfer" works properly. But when I typed the " $> source $FREESURFER_HOME/SetUpFreeSurfer.sh ". an error occurred as below:
Hosseins-MacBook-Pro:~ dhs$ > export FREESURFER_HOME=/Applications/freesurfer
Hosseins-MacBook-Pro:~ dhs$ > source $FREESURFER_HOME/SetUpFreeSurfer.sh
/Applications/freesurfer/SetUpFreeSurfer.sh: line 14: return: can only `return' from a function or sourced script
/Applications/freesurfer/SetUpFreeSurfer.sh: line 42: /FreeSurferEnv.sh: No such file or directory
Hosseins-MacBook-Pro:~ dhs$
I have done this steps using bash shell but the results was the same as following:
bash-3.2$ chsh -s /bin/sh
Changing shell for dhs.
Password for dhs:
bash-3.2$ > export FREESURFER_HOME=/Applications/freesurfer/
bash-3.2$ > source $FREESURFER_HOME/SetUpFreeSurfer.sh
/Applications/freesurfer//SetUpFreeSurfer.sh: line 14: return: can only `return' from a function or sourced script
/Applications/freesurfer//SetUpFreeSurfer.sh: line 42: /FreeSurferEnv.sh: No such file or directory
bash-3.2$
I have checked the mail archives but there no answer to my problem. Please help me to solve the issue and setup freesurfer successfully.
Bests regard
Hossein
[Image removed by sender. Mailtrack]https://mailtrack.io/?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& Sender notified by Mailtrackhttps://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& 04/01/20, 12:44:24 PM [Image removed by sender.]