AFNI Install for Multiple users

Hello AFNI gurus,

I apologize in advance for my tech knowledge deficiencies…I am trying to update our installation of AFNI on our compute resource (linux) for multiple users. I successfully updated AFNI for myself, however, when I try to do so for multiple users it seems to actually lead to making it so I can’t call afni as a single user anymore either. This is what it know gives me when I try afni -ver

tue50988@cla19097:~$ afni -ver
-bash: /usr/local/abin/afni: cannot execute binary file: Exec format error

I tried updating using some code found online in searching for how-to’s. I have copied the code and output below. THANK YOU!

tue50988@cla19097:~$ tcsh @update.afni.binaries -package macos_10.12_local -do_extras
– running @update.afni.binaries version 3.20, May 3, 2022
– have AFNI binaries under /usr/local/abin
– install dir: using existing /usr/local/abin
– any downloads will be from via wget

– attempting to install package macos_10.12_local under
install dir: /usr/local/abin…
– have install dir
++ working in new temp dir, .tmp.install
++ getting install prog: wget bin/misc/@update.afni.binaries
–2022-05-30 09:10:48--
Resolving (…, 2607:f220:419:4103::114
Connecting to (||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 49912 (49K) [text/plain]
Saving to: ‘@update.afni.binaries

@update.afni.binaries 100%[=====================================================================>] 48.74K --.-KB/s in 0.02s

2022-05-30 09:10:48 (2.49 MB/s) - ‘@update.afni.binaries’ saved [49912/49912]

– fixing lost permissions on @update.afni.binaries
@update.afni.binaries is current, continuing with this version…
++ downloading test file: wget macos_10.12_local/afni …
–2022-05-30 09:10:48--
Resolving (…, 2607:f220:419:4103::114
Connecting to (||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 12275956 (12M)
Saving to: ‘afni’

afni 100%[=====================================================================>] 11.71M 77.1MB/s in 0.2s

2022-05-30 09:10:48 (77.1 MB/s) - ‘afni’ saved [12275956/12275956]

++ no update needed
tue50988@cla19097:~$ cp $HOME/abin/AFNI.afnirc $HOME/.afnirc
cp: cannot stat ‘/home/local/TU/tue50988/abin/AFNI.afnirc’: No such file or directory
tue50988@cla19097:~$ suma -update_env
-bash: /usr/local/abin/suma: cannot execute binary file: Exec format error


It looks like you are trying to install mac binaries on a linux platform, which leads to the “exec format” errors.
And since the install is going under /usr/local/abin, that is where afni AFNI.afnirc would be copied out of.

It seems likely that you would want the linux_centos_7_64 package (rather than macos_10.12_local), but let’s verify that.
What is the output of:

cat /etc/os-release

To provide more information, you could post the output from: -check_all


  • rick

Thanks so much Rick!

Here’s my output from cat /etc/os-release

tue50988@cla19097:~$ cat /etc/os-release
VERSION=“20.04.4 LTS (Focal Fossa)”
PRETTY_NAME=“Ubuntu 20.04.4 LTS”

and here’s the output from: -check_all

tue50988@cla19097:~$ -check_all
-------------------------------- general ---------------------------------
architecture: 64bit ELF
system: Linux
release: 5.13.0-44-generic
version: #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022
distribution: ubuntu 20.04 focal
number of CPUs: 48
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /usr/local/abin/afni
afni version : /bin/sh: 1: afni: Exec format error
AFNI_version.txt : AFNI_22.1.10, macos_10.12_local, May 20 2022
which python : /usr/bin/python
python version : 3.8.10
which R : /usr/bin/R
R version : R version 3.6.3 (2020-02-29) – “Holding the Windsock”
which tcsh : /usr/bin/tcsh

instances of various programs found in PATH:
afni : 1 (/usr/local/abin/afni)
R : 1 (/usr/bin/R)
python : 1 (/usr/bin/python3.8)
python2 : 1 (/usr/bin/python2.7)
python3 : 1 (/usr/bin/python3.8)

testing ability to start various programs…
afni : FAILURE
/bin/sh: 1: afni: Exec format error
suma : FAILURE
/bin/sh: 1: suma: Exec format error
3dSkullStrip : FAILURE
/bin/sh: 1: 3dSkullStrip: Exec format error : success
3dAllineate : FAILURE
/bin/sh: 1: 3dAllineate: Exec format error
/bin/sh: 1: 3dRSFC: Exec format error
SurfMesh : FAILURE
/bin/sh: 1: SurfMesh: Exec format error
3dClustSim : FAILURE
/bin/sh: 1: 3dClustSim: Exec format error
Error in dyn.load(ll) :
unable to load shared object ‘/usr/local/abin/’:
/usr/local/abin/ invalid ELF header
Calls: source … withVisible → eval → eval → set_R_io → dyn.load
Execution halted

checking for R packages…
rPkgsInstall -pkgs ALL -check : success

R RHOME : /usr/lib/R

checking for $HOME files…
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------
** failed to load module PyQt4
– PyQt4 is no longer needed for an AFNI bootcamp

++ module loaded: matplotlib.pyplot
module file : /usr/lib/python3/dist-packages/matplotlib/
matplotlib version : 3.1.2

-------------------------------- env vars --------------------------------
PATH = /home/local/TU/tue50988/.local/bin:/usr/local/freesurfer/bin:/usr/local/freesurfer/fsfast/bin:/usr/local/freesurfer/tktools:/usr/local/fsl/bin:/usr/local/freesurfer/mni/bin:/usr/local/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/abin:/usr/local/abin

DYLD_LIBRARY_PATH = :/opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace


------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /usr/local/abin

------------------------------ OS specific -------------------------------
which apt-get : /usr/bin/apt-get
apt-get version : apt 2.0.8 (amd64)

have Ubuntu system: ubuntu 20.04 focal

========================= summary, please fix: =========================

  • just be aware: login shell ‘bash’, but our code examples use ‘tcsh’
  • AFNI programs show FAILURE
  • insufficient data for AFNI bootcamp
    (see “Prepare for Bootcamp” on install pages)

Hi Megan,

Oh, you are on Ubuntu 20. So try to the linux_ubuntu_16_64 package.

If this is an high-performane computing setup, maybe you will be okay. But if necessary, the top of the ubuntu 20 installation instructions mentions any prerequisite system packages.
Or actually, here is the sub-section explicitly listing the packages.

  • rick

Thank you so much!