External Email - Use Caution        

Hello Stephan,

I’m assuming you’re running the freesurfer 6.0.0 release and used the Mac pkg file to install it on your Mac from,
freesurfer-Darwin-OSX-stable-pub-v6..0.0.dmg

You would need admin/root privileges to use the “Security and Privacy” tab from the System preferences window on the Mac to give the pkg file permission to install freesurfer as /Applications/freesurfer

I have just done this install on a machine running Catalina (Mac OS 10.15.2).  Then I ran the commands below.  Please try them and see if you get the same results.  The first command I typed is “bash” to start a bash shell.

% bash

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Mac:~> 

Mac:~> export FREESURFER_HOME=/Applications/freesurfer

Mac:~> source /Applications/freesurfer/SetUpFreeSurfer.sh
-------- freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /Applications/freesurfer
FSFAST_HOME       /Applications/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /Applications/freesurfer/subjects
MNI_DIR           /Applications/freesurfer/mni

Mac:~> which mri_convert
/Applications/freesurfer/bin/mri_convert

Mac:~> file `which mri_convert`
/Applications/freesurfer/bin/mri_convert: Bourne-Again shell script text executable, ASCII text

Mac:~> which mri_convert.bin
/Applications/freesurfer/bin/mri_convert..bin

Mac:~> file `which mri_convert.bin`
/Applications/freesurfer/bin/mri_convert.bin: Mach-O 64-bit executable x86_64

Mac:~> bash -x /Applications/freesurfer/bin/mri_convert --help
+ source /Applications/freesurfer/sources.sh
+++ uname -s
++ '[' Darwin == Darwin ']'
++ source /Applications/freesurfer/SetUpFreeSurfer.sh
+++ '[' -z /Applications/freesurfer ']'
+++ '[' -z /Applications/freesurfer/subjects ']'
+++ '[' -z /Applications/freesurfer/sessions ']'
+++ source /Applications/freesurfer/FreeSurferEnv.sh
++++ VERSION='$Id: FreeSurferEnv.sh,v 1.61 2016/06/09 14:54:31 zkaufman Exp $'
++++ '[' 1 -gt 1 ']'
+++++ uname -s
++++ os=Darwin
++++ export OS=Darwin
++++ OS=Darwin
++++ '[' -n '' ']'
++++ output=1
++++ [[ -z synpro ]]
++++ [[ -z '' ]]
++++ output=0
++++ '[' -z /Applications/freesurfer ']'
++++ '[' '!' -d /Applications/freesurfer ']'
++++ [[ 0 == 1 ]]
++++ '[' -z /Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/synpro/bin ']'
++++ '[' -z 0 ']'
++++ [[ -z /Applications/freesurfer/fsfast ]]
++++ [[ 0 != 0 ]]
++++ [[ -z /Applications/freesurfer/subjects ]]
++++ [[ 0 != 0 ]]
++++ [[ -z '' ]]
++++ [[ -z /Applications/freesurfer/mni/bin ]]
++++ [[ 0 != 0 ]]
++++ [[ -z '' ]]
++++ [[ -z /Applications/freesurfer/mni/lib ]]
++++ [[ 0 != 0 ]]
++++ [[ -z '' ]]
++++ [[ -z /Applications/freesurfer/mni/data ]]
++++ [[ 0 != 0 ]]
++++ [[ -z '' ]]
++++ '[' -n '' ']'
++++ '[' -e /Applications/freesurfer/fsl ']'
++++ '[' -e /usr/pubsw/packages/fsl/current ']'
++++ '[' -e /usr/local/pubsw/packages/fsl/current ']'
++++ '[' -e /usr/local/fsl ']'
++++ export FREESURFER_HOME=/Applications/freesurfer
++++ FREESURFER_HOME=/Applications/freesurfer
++++ export LOCAL_DIR=/Applications/freesurfer/local
++++ LOCAL_DIR=/Applications/freesurfer/local
++++ for d in '"$FSFAST_HOME"' '"$SUBJECTS_DIR"'
++++ '[' '!' -d /Applications/freesurfer/fsfast ']'
++++ for d in '"$FSFAST_HOME"' '"$SUBJECTS_DIR"'
++++ '[' '!' -d /Applications/freesurfer/subjects ']'
++++ [[ -z nii.gz ]]
++++ [[ 0 != 0 ]]
++++ [[ 0 == 1 ]]
++++ [[ 0 == 1 ]]
++++ [[ -z '' ]]
++++ export FMRI_ANALYSIS_DIR=/Applications/freesurfer/fsfast
++++ FMRI_ANALYSIS_DIR=/Applications/freesurfer/fsfast
++++ SUF=/Users/synpro/matlab/startup.m
++++ '[' '!' -e /Users/synpro/matlab/startup.m ']'
+++++ grep FSFAST_HOME /Users/synpro/matlab/startup.m
+++++ wc -l
++++ tmp1='       1'
+++++ grep FMRI_ANALYSIS_DIR /Users/synpro/matlab/startup.m
+++++ wc -l
++++ tmp2='       0'
+++++ grep FREESURFER_HOME /Users/synpro/matlab/startup.m
+++++ wc -l
++++ tmp3='       1'
++++ [[        1 == 0 ]]
++++ [[ 0 == 1 ]]
++++ '[' -z '' ']'
++++ '[' -n /Applications/freesurfer/mni/bin ']'
++++ '[' '!' -d /Applications/freesurfer/mni/bin ']'
++++ '[' -n /Applications/freesurfer/mni/lib ']'
++++ '[' '!' -d /Applications/freesurfer/mni/lib ']'
++++ '[' -z /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.12.3 ']'
++++ '[' -z /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.12.3 ']'
++++ '[' /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.12.3 '!=' /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.12.3 ']'
++++ '[' -z '' ']'
++++ '[' -n /Applications/freesurfer/mni/bin ']'
++++ PATH=/Applications/freesurfer/mni/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/synpro/bin
++++ '[' -d /Applications/freesurfer/lib/misc/bin ']'
++++ '[' -d /Applications/freesurfer/lib/misc/lib ']'
++++ [[ 0 == 1 ]]
++++ '[' -d /Applications/freesurfer/bin/freeview.app ']'
++++ '[' -d /Applications/freesurfer/lib/gcc/lib ']'
++++ '[' -z '' ']'
++++ export DYLD_LIBRARY_PATH=/Applications/freesurfer/lib/gcc/lib
++++ DYLD_LIBRARY_PATH=/Applications/freesurfer/lib/gcc/lib
++++ '[' -n '' ']'
++++ [[ 0 == 1 ]]
++++ '[' -n '' ']'
++++ '[' -n '' ']'
++++ [[ 0 == 1 ]]
++++ '[' -d /Applications/freesurfer/tktools ']'
++++ PATH=/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/synpro/bin
++++ export PATH=/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/synpro/bin
++++ PATH=/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/Applications/freesurfer/mni/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/synpro/bin
++++ export FIX_VERTEX_AREA=
++++ FIX_VERTEX_AREA=
++++ return 0
+ mri_convert.bin --help
mri_convert.bin --help 
Help

NAME
mri_convert

SYNOPSIS
mri_convert [options] <in volume> <out volume>

… rest of output deleted …

On Apr 3, 2020, at 11:28, Stephan <stephan.wunderlich22@gmail.com> wrote:

        External Email - Use Caution        


Hi Freesurer team,

I am trying to run mri_convert (and recon_all) with a Macbook Pro 2019 with Catalina.
Running mri_convert always leads to the following error:
//Users/neurolab/Desktop/Stephan/Programmes/freesurfer/bin/mri_convert: line 3: //Users/neurolab/Desktop/Stephan/Programmes/freesurfer/bin/mri_convert.bin: cannot execute binary file

All security changes haven't helped yet.

Best,
Stephan
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer