Hi Philipp,
The flat_namespace bit is secondary, and might just be because apple tries to make working with such variable more and more difficult. <sigh>
In any case, just add that same .bashrc line to your ~/.zshrc file (if it isn't already there).
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/opt/X11/lib/flat_namespace
But R_io.so is compiled against R version 3.6.x. So on a mac at least, it does not currently work with 4.x.
If you really want to use the R packages on that mac, it might be necessary to compile AFNI locally, which might take some work (the homebrew dependencies seem to be a bit of a moving target right now). Is that something that you would like to consider? Otherwise, is installing 3.6 an option?
- rick