When I install AFNI for apple silicon on an M1 Max, and I have R 4.6.2 for arm64 already installed, I get errors.
When running afni_system_check.py -check_all
I get:
-------------------------------- general ---------------------------------
architecture: 64bit Mach-O
cpu type: arm64
system: Darwin
release: 25.6.0
version: Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000
distribution: 26.7.1
number of CPUs: 10
user: janeallendorfer
apparent login shell: zsh
shell RC file: .zshrc (exists)
--------------------- AFNI and related program tests ---------------------
which afni : /Users/janeallendorfer/abin/afni
afni version : Precompiled binary macos_10.12_local: Oct 23 2026
: AFNI_26.3.05 'Philip the Arab'
AFNI_version.txt : AFNI_26.3.05, macos_10.12_local, Oct 23 2026, official
afnipy version : AFNI_26.3.05
which python : /opt/homebrew/opt/python/libexec/bin/python
python version : 3.15.2
which R : /usr/local/bin/R
R version : R version 4.6.2 (aarch64-apple-darwin23)
instances of various programs found in PATH:
afni : 1 (/Users/janeallendorfer/abin/afni)
R : 1 (/Library/Frameworks/R.framework/Versions/4.6/Resources/bin/R)
python : 1 (/opt/homebrew/Cellar/python@3.15/3.15.2/Frameworks/Python.framework/Versions/3.15/bin/python3.15)
python2 : 0
python3 : 2
/opt/homebrew/Cellar/python@3.15/3.15.2/Frameworks/Python.framework/Versions/3.15/bin/python3.15
/usr/bin/python3
testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
build_afni.py : success
uber_subject.py : success
3dMVM : FAILURE
Error in dyn.load(ll) :
unable to load shared object '/Users/janeallendorfer/abin/R_io.so':
dlopen(/Users/janeallendorfer/abin/R_io.so, 0x0006): tried: '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/janeallendorfer/abin/R_io.so' (no such file), '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))
Calls: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
Execution halted
rPkgsInstall : FAILURE
Error in dyn.load(ll) :
unable to load shared object '/Users/janeallendorfer/abin/R_io.so':
dlopen(/Users/janeallendorfer/abin/R_io.so, 0x0006): tried: '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/janeallendorfer/abin/R_io.so' (no such file), '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))
Calls: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
Execution halted
------------------------ dependent program tests -------------------------
checking for dependent programs...
which tcsh : /bin/tcsh
tcsh version : 6.21.00
which Xvfb : /opt/X11/bin/Xvfb
checking for R packages...
rPkgsInstall -pkgs ALL -check : FAILURE
Error in dyn.load(ll) :
unable to load shared object '/Users/janeallendorfer/abin/R_io.so':
dlopen(/Users/janeallendorfer/abin/R_io.so, 0x0006): tried: '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/janeallendorfer/abin/R_io.so' (no such file), '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))
Calls: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
Execution halted
R RHOME : /Library/Frameworks/R.framework/Resources
------------------------------ python libs -------------------------------
** failed to load module matplotlib.pyplot
-- matplotlib.pyplot is required
** failed to load module flask
-- flask is required
** failed to load module flask_cors
-- flask_cors is required
-------------------------------- env vars --------------------------------
PATH = /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/opt/X11/bin:/Library/Apple/usr/bin:/opt/homebrew/bin:/opt/homebrew/opt/python/libexec/bin:/Library/Frameworks/R.framework/Resources:/usr/local/gfortran/bin:/Users/janeallendorfer/abin:/opt/homebrew/opt/python/libexec/bin
PYTHONPATH =
R_LIBS = /Users/janeallendorfer/sw/R-4.6.2
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = :/opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =
CONDA_SHLVL =
CONDA_DEFAULT_ENV =
CC =
HOMEBREW_PREFIX = /opt/homebrew
----------------------------- eval dot files -----------------------------
----------- AFNI $HOME files -----------
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found
--------- shell startup files ----------
-- considered operations: path, flatdir, apsearch
-- note: followers should not need edits, so edit flags should be 0
(have 0 follower(s), which can be ignored)
no modifications needed across 1 dot files
------------------------------ data checks -------------------------------
data dir : found AFNI_data6 under $HOME (1902G Avail)
history: 20 Feb 2020 [rickr]: updated FT_analysis examples
data dir : missing AFNI_data7
data dir : found AFNI_demos under $HOME
history: 29 Oct 2020 [taylorp]: updated scripts under FATCAT_DEM ...
data dir : found suma_demo under $HOME
history: Archive created by @PrepArchives in eomer.nimh.nih.gov ...
data dir : found afni_handouts under $HOME
atlas : found TT_N27+tlrc under /Users/janeallendorfer/abin
------------------------------ OS specific -------------------------------
XQuartz version : 2.8.6
which brew : /opt/homebrew/bin/brew
brew version : Homebrew 7.0.11
which git : /usr/bin/git
git version : git version 2.50.1 (Apple Git-155)
which gcc : /usr/bin/gcc
gcc version : Apple clang version 21.0.0 (clang-2100.1.1.101)
brew gcc(s) : /opt/homebrew/bin/gcc-16
CommandLineTools SDK : MacOSX26.5.sdk
++ found 1 dylib files under '/opt/X11/lib/flat_namespace'
-- found 'libXt' dylib files:
/opt/X11/lib/flat_namespace/libXt.6.dylib
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell 'zsh'...
++ found evar DYLD_LIBRARY_PATH = :/opt/X11/lib/flat_namespace
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in shell 'tcsh'...
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace
========================= summary, please fix: =========================
* have ARM cpu, but Intel AFNI binaries
- consider online install instructions for local build, or more directly:
build_afni.py -build_root ~/afni_build -package macos_13_ARM
* AFNI programs show FAILURE
* missing R packages (see rPkgsInstall)
* python library matplotlib is required
(see AFNI install docs for details)
* python library flask is required
* python library flask_cors is required
* insufficient data for AFNI bootcamp
(see "Prepare for Bootcamp" on install pages)
janeallendorfer@NEURO-C61JHXTQ0L ~ % rPkgsInstall -pkgs ALL
oo Warning:
Failed to load R_io.so with this error message:
/Users/janeallendorfer/abin/R_io.so
Error in dyn.load(ll) :
unable to load shared object '/Users/janeallendorfer/abin/R_io.so':
dlopen(/Users/janeallendorfer/abin/R_io.so, 0x0006): tried: '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/janeallendorfer/abin/R_io.so' (no such file), '/Users/janeallendorfer/abin/R_io.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))
Calls: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
Execution halted
janeallendorfer@NEURO-C61JHXTQ0L ~ % R --version
R version 4.6.2 (2026-10-29) -- "Diversified Portfolio"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin23
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
But when I run "R --version" I get
janeallendorfer@NEURO-C61JHXTQ0L abin % R --version
R version 4.6.2 (2026-10-29) -- "Diversified Portfolio"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin23
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
Any help would be appreciated. So far, I have updated AFNI by completely reinstalling it per the NIH tool website, and have uninstalled any traces of R and reinstalled the latest and greatest from CRAN. I have updated all of brew and have made sure all environmental path statements are up to date.