I am working to install AFNI on a new mac with Catalina (MacOS 10.15.4). I have been able to work through the online install instructions, but I receive an error:
I am going to guess it is “zsh”, which for some reason is the default shell on Macs as of OS 15.*… We typically setup for either “bash” or “tcsh” shells.
If you don’t have a strong preference of background shell, the simplest thing to do would probably be to change your default shell in terminals to one of the more common ones (bash or tcsh). To do so, open “System Preferences”, click on “Users & Groups”, click on the closed lock in the lower left of the panel (if the lock is open already, you don’t need to click on it) and enter your admin/root password to unlock it, then right-click on your username in the menu in the pale that is your “current user” and select “Advanced Options…” (which should be the only option there). Theeeeen, in the menu of options there, go to the “Login shell” one, and change what is currently there (probably “/bin/zsh”) to either “/bin/bash” or “/bin/tcsh”; your choice here doesn’t matter so much-- I use “/bin/bash”, other people in the group use “/bin/tcsh”, and the AFNI setup instructions cover both scenarios.
After doing that, you will likely have to log out and log back in for those changes to take effect. When you open a terminal now and type “echo $0”, you should see something with either “bash” or “tcsh” (depending on what you picked for your new login shell), possibly with a minus sign (fine if you do/don’t see that).
Then you should be able to run
suma -update_env
and all the other fun AFNI programs; first thing to try might be to see how happy the system check is:
Glad the shell changing was pretty straightforwad (sigh, Macs always try to complicate life…).
Ummm, that’s good about installing the AFNI binaries except you shouldn’t need (nor want) to use “sudo” there. The “sudo” power, enabling your command to have admin privileges, is only necessary if you install things into the system-side of things; by default, we install the AFNI binaries into a directory called “abin” that sits in your home directory-- you don’t need admin privileges to write there. The benefit of this is that it keeps things simple to update, and you don’t need to be an admin to update your local binaries.
Soooo, actually I would recommend removing the “abin” directory in your home directory, and re-running the @update* command without the “sudo”.
Once you do that, can you please copy+paste the following:
A)
Thanks for the info about sudo, I originally added the sudo command based on the following error that is generated during the following step
tcsh @update.afni.binaries -package macos_10.12_local -do_extras
…
++ extracting package macos_10.12_local.tgz…
++ backing up current binaries to auto_backup.macos_10.12_local
++ installing new binaries…
++ adding /Users/amy/abin to PATH in /Users/amy/.bash_profile …
++ setting DYLD_LIBRARY_PATH in /Users/amy/.bash_profile …
/Users/amy/.bash_profile: Permission denied.
I did go on to run the commands you recommended and the outputs are shown here
which afni
[no output]
which suma
[no output]
afni_system_check.py -check_all
-bash: afni_system_check.py: command not found
Hmm, OK. I think that the the “permission denied” there means that those files are somehow owned by root now. What is the output of this?
ls -ld ~/.*rc
Re. the “which …” and “afni_system_check.py …” not being found-- that is because your path isn’t set up, and maybe your ~/abin/ isn’t created at the moment. Getting the path set depends on being able to write to your ~/.*rc files, so let’s sort that out first (so, dealing with the stuff in the first paragraph in this note).
And the suma -update env command also successfully ran.
I have now moved on to installing R, and have run into another error. I installed R3.5.3 and confirmed I can open and run R from the terminal, but I receive the following error when running the command:
sudo rPkgsInstall -pkgs ALL
updating R_LD_LIBRARY_PATH …
oo Warning:
Failed to load R_io.so with this error message:
Error in dyn.load(ll) :
unable to load shared object ‘/Users/amy/abin/R_io.so’:
dlopen(/Users/amy/abin/R_io.so, 6): Library not loaded: /sw/Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libR.dylib
Referenced from: /Users/amy/abin/R_io.so
Reason: Incompatible library version: R_io.so requires version 3.6.0 or later, but libR.dylib provides version 3.5.0
Calls: source … withVisible → eval → eval → set_R_io → dyn.load
Execution halted
I do have another version of R installed in a different enviornment, is this causing the problem?
It looks like the directory /Library/Frameworks/R.framework/Versions/3.6 does not exist
ls -l /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libR*
ls: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libR*: No such file or directory
navigating to the Versions Directory (there are two subdirectories: 3.5 and Current)
ls -l /Library/Frameworks/R.framework/Versions
total 0
drwxrwxr-x 6 root admin 192 Jun 11 12:49 3.5
lrwxr-xr-x 1 root admin 3 Jun 11 12:49 Current → 3.5
Related to Catalina installations. AFNI binaries installed fine for me, but loading R_io.so fails to load with the following:
Error in dyn.load(ll) :
unable to load shared object ‘/Users/zsaad/abin/R_io.so’:
dlopen(/Users/zsaad/abin/R_io.so, 6): Library not loaded: /sw/Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libR.dylib
Referenced from: /Users/zsaad/abin/R_io.so
Reason: image not found
I am using R version 4.01.1, so my R library is /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib any chance I can get AFNI’s R_io.so to work with it?
Would compiling locally solve the problem and if so, what is the latest recommended makefile for a build?
I am using R version 4.01.1, so my R library is /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib
any chance I can get AFNI’s R_io.so to work with it?
Greetings, Chairman Z-
Rick is trying to build an R_io.so for Mac OS 10.15, and hopefully it will be available soon. In the meantime, if you’re in a hurry, get R 3.6.3 (https://cloud.r-project.org/bin/macosx/R-3.6.3.nn.pkg) and it should solve the problem.
Yes, it is probably enough to also have 3.6 installed for now, even if it is not your “current”. We will try to handle this more usefully soon.
Building yourself would work, too. But we are still using the 10.12 Makefile, which is fink-based. We will probably make a 10.14 build system that is based on homebrew. There is a current 10.14 Makefile from Peter, which is based on homebrew and conda. Maybe that is useful for now.
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.