AFNI installation on Fedora 39

Hi,

Following the standard quick install instructions on Fedora 39 (with a tcsh shell), I ended up with various errors. The commands in the "please run" section are throwing errors themselves.

The output of afni_system_check.py -check_all was:

-------------------------------- general ---------------------------------
architecture: 64bit ELF
cpu type:
system: Linux
release: 6.8.4-200.fc39.x86_64
version: #1 SMP PREEMPT_DYNAMIC Thu Apr 4 20:45:21 UTC 2024
distribution: fedora 39 Workstation Edition
number of CPUs: 16
apparent login shell: tcsh
shell RC file: .tcshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /home/chholak/abin/afni
afni version : afni: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
:
AFNI_version.txt : AFNI_24.1.17, linux_openmp_64, Jun 07 2024, official
which python : /usr/bin/python
python version : 3.12.3
which R : /usr/bin/R
R version : R version 4.3.3 (x86_64-redhat-linux-gnu)

instances of various programs found in PATH:
afni : 1 (/home/chholak/abin/afni)
R : 1 (/usr/bin/R)
python : 1 (/usr/bin/python3.12)
python2 : 0
python3 : 1 (/usr/bin/python3.12)

** have python3 but not python2

testing ability to start various programs...
afni : FAILURE
afni: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
suma : FAILURE
suma: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dSkullStrip : FAILURE
3dSkullStrip: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dAllineate : FAILURE
3dAllineate: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dRSFC : FAILURE
3dRSFC: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
SurfMesh : FAILURE
SurfMesh: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dClustSim : FAILURE
3dClustSim: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
uber_subject.py : success
3dMVM : FAILURE
Error in library(data.table) : there is no package called ‘data.table’
Calls: source ... suppressPackageStartupMessages -> withCallingHandlers -> library
Execution halted

** missing 4 binary libraries across 7 programs
** missing 2 binary libraries in program R_io.so

------------------------ dependent program tests -------------------------
checking for dependent programs...

which tcsh : /usr/bin/tcsh
tcsh version : 6.24.10
which Xvfb :

checking for R packages...
rPkgsInstall -pkgs ALL -check : FAILURE
Error in dyn.load(ll) :
unable to load shared object '/home/chholak/abin/R_io.so':
libXp.so.6: cannot open shared object file: No such file or directory
Calls: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
Execution halted

R RHOME : /usr/lib64/R

------------------------------ python libs -------------------------------

++ module loaded: matplotlib.pyplot
module file : /home/chholak/.local/lib/python3.12/site-packages/matplotlib/pyplot.py
matplotlib version : 3.9.0

** failed to load module flask
-- flask is not required, but is desirable

** failed to load module flask_cors
-- flask_cors is not required, but is desirable

-------------------------------- env vars --------------------------------
PATH = /home/chholak/.local/bin:/home/chholak/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/chholak/abin

PYTHONPATH =
R_LIBS = /home/chholak/R
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =
CONDA_SHLVL =
CONDA_DEFAULT_ENV =

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

.afnirc                   : found
.sumarc                   : missing
.afni/help/all_progs.COMP : missing

--------- shell startup files ----------

-- good: .tcshrc seems to contain 'source .cshrc'
-- considered operations: path, apsearch

-- note: followers should not need edits, so edit flags should be 0
(have 1 follower(s), which can be ignored)

dot file test : want 1 modifications across 2 files:

  file             path  flatdir  apsearch        follower
  ---------------  ----  -------  --------        --------
  .cshrc           0     0        1               0     
  .tcshrc          0     0        0               1     

------------------------------ data checks -------------------------------
data dir : found AFNI_data6 under $HOME (1906104M Avail)
top history: ... 2024 [rickr]: 3drefit -newid FT/SUMA/FT_SurfVol.nii
data dir : found AFNI_demos under $HOME
top history: ...ct 2020 [taylorp]: updated scripts under FATCAT_DEMO
data dir : found suma_demo under $HOME
top history: ...s_New/data/Build_tmp on Mon Mar 4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas : found TT_N27+tlrc under /home/chholak/abin

------------------------------ OS specific -------------------------------
which dnf : /usr/bin/dnf
dnf version : 4.19.2
which yum : /usr/bin/yum
yum version : 4.19.2

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

  • AFNI programs show FAILURE
  • missing binary library: libXp.so.6
  • missing binary library: libpng12.so.0
  • missing binary library: libgsl.so.0
  • missing binary library: libgslcblas.so.0
  • missing program: Xvfb
  • missing R packages (see rPkgsInstall)
  • please run: "suma -update_env" for .sumarc
  • please run: apsearch -update_all_afni_help
  • dot file test : want 1 modifications across 2 files:

====================================================================

What should I do? Is there any other information that I can provide?

Thanks,
Parth

Hi, Parth-

Can you please check out the Fedora install instructions here?

It looks like you might have used a different website, because you don't have a lot of the dependencies there that should be listed there.

--pt

Hello!

Thank you so much for taking a look at this and your response.

I used this exact webpage for installation. What shall I do?

Thanks,
Parth

Do you have admin privileges on that computer?

What happens if you run this set of installations directly, rather than by a script:

sudo dnf update

sudo dnf install -y tcsh libXp openmotif gsl xorg-x11-fonts-misc       \
                    PyQt4 R-devel netpbm-progs gnome-tweak-tool ed     \
                    xorg-x11-server-Xvfb firefox                       \
                    python3-matplotlib python3-numpy                   \
                    python3-flask python3-flask-cors

sudo dnf update -y

?

--pt

I do have admin privileges on this computer.

I got the following response on running the said command:

Last metadata expiration check: 1:19:22 ago on Thu 13 Jun 2024 02:35:25 PM EDT.
Package tcsh-6.24.10-2.fc39.x86_64 is already installed.
Package xorg-x11-fonts-misc-7.5-36.fc39.noarch is already installed.
No match for argument: PyQt4
Package R-devel-4.3.3-2.fc39.x86_64 is already installed.
Package gnome-tweaks-45.2-1.fc39.noarch is already installed.
Package ed-1.19-4.fc39.x86_64 is already installed.
Package firefox-126.0-7.fc39.x86_64 is already installed.
Error: Unable to find a match: PyQt4

If you log out and log back in, what does the:

afni_system_check.py -check_all

report, then?

--pt

-------------------------------- general ---------------------------------
architecture: 64bit ELF
cpu type:
system: Linux
release: 6.8.4-200.fc39.x86_64
version: #1 SMP PREEMPT_DYNAMIC Thu Apr 4 20:45:21 UTC 2024
distribution: fedora 39 Workstation Edition
number of CPUs: 16
apparent login shell: tcsh
shell RC file: .tcshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /home/chholak/abin/afni
afni version : afni: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
:
AFNI_version.txt : AFNI_24.1.17, linux_openmp_64, Jun 07 2024, official
which python : /usr/bin/python
python version : 3.12.3
which R : /usr/bin/R
R version : R version 4.3.3 (x86_64-redhat-linux-gnu)

instances of various programs found in PATH:
afni : 1 (/home/chholak/abin/afni)
R : 1 (/usr/bin/R)
python : 1 (/usr/bin/python3.12)
python2 : 0
python3 : 1 (/usr/bin/python3.12)

** have python3 but not python2

testing ability to start various programs...
afni : FAILURE
afni: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
suma : FAILURE
suma: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dSkullStrip : FAILURE
3dSkullStrip: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dAllineate : FAILURE
3dAllineate: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dRSFC : FAILURE
3dRSFC: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
SurfMesh : FAILURE
SurfMesh: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
3dClustSim : FAILURE
3dClustSim: error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
uber_subject.py : success
3dMVM : FAILURE
Error in library(data.table) : there is no package called ‘data.table’
Calls: source ... suppressPackageStartupMessages -> withCallingHandlers -> library
Execution halted

** missing 4 binary libraries across 7 programs
** missing 2 binary libraries in program R_io.so

------------------------ dependent program tests -------------------------
checking for dependent programs...

which tcsh : /usr/bin/tcsh
tcsh version : 6.24.10
which Xvfb :

checking for R packages...
rPkgsInstall -pkgs ALL -check : FAILURE
Error in dyn.load(ll) :
unable to load shared object '/home/chholak/abin/R_io.so':
libXp.so.6: cannot open shared object file: No such file or directory
Calls: source ... withVisible -> eval -> eval -> set_R_io -> dyn.load
Execution halted

R RHOME : /usr/lib64/R

------------------------------ python libs -------------------------------

++ module loaded: matplotlib.pyplot
module file : /home/chholak/.local/lib/python3.12/site-packages/matplotlib/pyplot.py
matplotlib version : 3.9.0

** failed to load module flask
-- flask is not required, but is desirable

** failed to load module flask_cors
-- flask_cors is not required, but is desirable

-------------------------------- env vars --------------------------------
PATH = /home/chholak/.local/bin:/home/chholak/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/chholak/abin:/home/chholak/abin

PYTHONPATH =
R_LIBS = /home/chholak/R
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =
CONDA_SHLVL =
CONDA_DEFAULT_ENV =

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

.afnirc                   : found
.sumarc                   : missing
.afni/help/all_progs.COMP : missing

--------- shell startup files ----------

-- good: .tcshrc seems to contain 'source .cshrc'
-- considered operations: path, apsearch

-- note: followers should not need edits, so edit flags should be 0
(have 1 follower(s), which can be ignored)

dot file test : want 1 modifications across 2 files:

  file             path  flatdir  apsearch        follower
  ---------------  ----  -------  --------        --------
  .cshrc           0     0        1               0     
  .tcshrc          0     0        0               1     

------------------------------ data checks -------------------------------
data dir : found AFNI_data6 under $HOME (1906104M Avail)
top history: ... 2024 [rickr]: 3drefit -newid FT/SUMA/FT_SurfVol.nii
data dir : found AFNI_demos under $HOME
top history: ...ct 2020 [taylorp]: updated scripts under FATCAT_DEMO
data dir : found suma_demo under $HOME
top history: ...s_New/data/Build_tmp on Mon Mar 4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas : found TT_N27+tlrc under /home/chholak/abin

------------------------------ OS specific -------------------------------
which dnf : /usr/bin/dnf
dnf version : 4.19.2
which yum : /usr/bin/yum
yum version : 4.19.2

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

  • AFNI programs show FAILURE
  • missing binary library: libXp.so.6
  • missing binary library: libpng12.so.0
  • missing binary library: libgsl.so.0
  • missing binary library: libgslcblas.so.0
  • missing program: Xvfb
  • missing R packages (see rPkgsInstall)
  • please run: "suma -update_env" for .sumarc
  • please run: apsearch -update_all_afni_help
  • dot file test : want 1 modifications across 2 files:

What is the output of just trying to install libXp:

sudo dnf install -y tcsh libXp

?

--pt

It went through without any problems. Here's the output nevertheless:

Last metadata expiration check: 2:25:42 ago on Thu 27 Jun 2024 06:34:56 AM EDT.
Package tcsh-6.24.10-2.fc39.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package         Architecture     Version                Repository        Size
================================================================================
Installing:
 libXp           x86_64           1.0.4-3.fc39           fedora            32 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 32 k
Installed size: 72 k
Downloading Packages:
libXp-1.0.4-3.fc39.x86_64.rpm                    75 kB/s |  32 kB     00:00    
--------------------------------------------------------------------------------
Total                                            29 kB/s |  32 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : libXp-1.0.4-3.fc39.x86_64                              1/1 
  Running scriptlet: libXp-1.0.4-3.fc39.x86_64                              1/1 
  Verifying        : libXp-1.0.4-3.fc39.x86_64                              1/1 

Installed:
  libXp-1.0.4-3.fc39.x86_64                                                     

Complete!

It looks like you are in pretty good shape, but for an alternative, I set up a system like this that compiles AFNI locally, rather than using the pre-compiled binaries. The downside of that is perhaps the packages and therefore instructions will change slowly across operating system releases. On the plus side, it works fine. :)

sudo dnf update
sudo dnf install tcsh openmotif-devel mesa-libGLw-devel mesa-libGLU-devel 	\
             	gsl-devel python3-devel expat-devel libXpm-devel libXi-devel \
             	gcc-c++ python3-matplotlib xorg-x11-server-Xvfb          	\
             	python3-PyQt4 R-devel netpbm-progs gnome-tweak-tool ed   	\
             	firefox python3-matplotlib python3-numpy                 	\
             	python3-flask python3-flask-cors                         	\
             	NLopt-devel libcurl-devel udunits2-devel openssl-devel

# and reboot

# now install AFNI:
curl -O https://afni.nimh.nih.gov/pub/dist/bin/misc/@update.afni.binaries
tcsh @update.afni.binaries -package anyos_text_atlas -do_extras

# logout and back in, or just source your appropriate rc file (e.g. source ~/.zshrc)

build_afni.py -build_root afni_build -package linux_fedora_35_shared

After that, you can update AFNI by running:

build_afni.py -build_root afni_build

If you try this, please let us know how it goes.

  • rick

Thank you for your response, Rick! Unfortunately, AFNI did not work at that point. So I deleted all files and compiled AFNI locally using your instructions in your last response. Apart from an error about SUMA not being detected, it went through without any obvious problems.

However, I don't know if it's going to work or not. I am new to AFNI and this is the first time I have built something from source as far as I remember. When I run afni -ver, I get an error afni: Command not found.. I ran this command both from "~" and "~/abin". Any suggestions on how should I proceed?

If the build went fine, then the error for afni not being found is likely related to the ~/abin directory not being part of your system path. It could be the setup correctly added that location to your path, but it just hasn't been sourced (or read) by the terminal in which setup was run. To check this, can you open a new terminal and try:

which afni

and

echo $PATH

copy+pasting the outputs of each of those commands here?

--pt

Thank you for your response, Dr. Taylor. I think I may have missed the last 2 commands to update AFNI earlier. While I am not 100% sure about that to have happened, everything does seem to be working after I ran the last 2 commands. My apologies for the confusion.

OK, glad to know it is working. Paths and things may have been updated in one/some terminal, but not in another one.

Enjoy the processing from here!

--pt

Thank you!

I just ran the same instructions (shared by rickr) on a different user account on the same machine (note: default shell is bash for that user). While running both afni and suma in the terminal did open the respective GUIs, I saw some issues when I ran the command afni_system_check.py -check_all:

-------------------------------- general ---------------------------------
architecture:         64bit ELF
cpu type:             
system:               Linux
release:              6.9.7-100.fc39.x86_64
version:              #1 SMP PREEMPT_DYNAMIC Thu Jun 27 18:06:32 UTC 2024
distribution:         fedora 39 Workstation Edition
number of CPUs:       16
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /home/rob/abin/afni
afni version         : Precompiled binary linux_fedora_35_shared: Jul 11 2024 
                     : AFNI_24.1.22 'Publius Septimius Geta'
AFNI_version.txt     : AFNI_24.1.22, linux_fedora_35_shared, Jul 11 2024, build
which python         : /usr/bin/python
python version       : 3.12.4
which R              : /usr/bin/R
R version            : R version 4.3.3 (x86_64-redhat-linux-gnu)

instances of various programs found in PATH:
    afni    : 1   (/home/rob/abin/afni)
    R       : 1   (/usr/bin/R)
    python  : 1   (/usr/bin/python3.12)
    python2 : 0 
    python3 : 1   (/usr/bin/python3.12)

** have python3 but not python2

testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success
    uber_subject.py      : success
    3dMVM                : FAILURE
        Error in library(data.table) : there is no package called ‘data.table’
        Calls: source ... suppressPackageStartupMessages -> withCallingHandlers -> library
        Execution halted

------------------------ dependent program tests -------------------------
checking for dependent programs...

which tcsh           : /usr/bin/tcsh
tcsh version         : 6.24.10
which Xvfb           : /usr/bin/Xvfb

checking for R packages...
    rPkgsInstall -pkgs ALL -check : FAILURE
        
        oo Warning: 
           These packages are not installed on the computer: afex!
        These packages are not installed on the computer: phia!
        These packages are not installed on the computer: snow!
        These packages are not installed on the computer: lme4!
        These packages are not installed on the computer: lmerTest!
        These packages are not installed on the computer: gamm4!
        These packages are not installed on the computer: data.table!
        These packages are not installed on the computer: paran!
        These packages are not installed on the computer: psych!
        These packages are not installed on the computer: brms!
        These packages are not installed on the computer: corrplot!
        These packages are not installed on the computer: metafor!
        

R RHOME : /usr/lib64/R

------------------------------ python libs -------------------------------

++ module loaded: matplotlib.pyplot
   module file : /usr/lib64/python3.12/site-packages/matplotlib/pyplot.py
   matplotlib version : 3.8.4

++ module loaded: flask
   module file : /usr/lib/python3.12/site-packages/flask/__init__.py
   flask version : 2.2.5

++ module loaded: flask_cors
   module file : /usr/lib/python3.12/site-packages/flask_cors/__init__.py
   flask_cors version : 4.0.1

-------------------------------- env vars --------------------------------
PATH                       = /home/rob/anaconda3/condabin:/home/rob/.local/bin:/home/rob/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/rob/abin:/home/rob/abin

PYTHONPATH                 = 
R_LIBS                     = 
LD_LIBRARY_PATH            = 
DYLD_LIBRARY_PATH          = 
DYLD_FALLBACK_LIBRARY_PATH = 
CONDA_SHLVL                = 0
CONDA_DEFAULT_ENV          = 

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

    .afnirc                   : found
    .sumarc                   : missing
    .afni/help/all_progs.COMP : missing

--------- shell startup files ----------

   -- good: .tcshrc seems to contain 'source .cshrc'
   -- considered operations: path, apsearch
   
   -- note: followers should not need edits, so edit flags should be 0
      (have 1 follower(s), which can be ignored)
   
   dot file test : want 2 modifications across 3 files:
   
      file             path  flatdir  apsearch        follower
      ---------------  ----  -------  --------        --------
      .cshrc           0     0        1               0     
      .tcshrc          0     0        0               1     
      .bashrc          0     0        1               0     
   
------------------------------ data checks -------------------------------
data dir : found AFNI_data6   under $HOME (1906104M Avail)
           top history: ... 2024 [rickr]: 3drefit -newid FT/SUMA/FT_SurfVol.nii
data dir : found AFNI_demos   under $HOME
           top history: ...ct 2020 [taylorp]: updated scripts under FATCAT_DEMO
data dir : found suma_demo    under $HOME
           top history: ...s_New/data/Build_tmp on Mon Mar  4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas    : found TT_N27+tlrc  under /home/rob/abin

------------------------------ OS specific -------------------------------
which dnf            : /usr/bin/dnf
dnf version          : 4.19.2
which yum            : /usr/bin/yum
yum version          : 4.19.2


=========================  summary, please fix:  =========================
*  just be aware: login shell 'bash', but our code examples use 'tcsh'
*  AFNI programs show FAILURE
*  missing R packages (see rPkgsInstall)
*  please run: "suma -update_env" for .sumarc
*  please run: apsearch -update_all_afni_help
*  dot file test : want 2 modifications across 3 files:

After running suma -update_env, apsearch -update_all_afni_help, and rPkgsInstall -pkgs ALL, all issues were resolved (except one small thing maybe; see below), although it did require me to change writing permissions of the 'usr/lib64/R/library' and '/usr/share/doc/R/html' directories.

The "summary, please fix: section of the final AFNI system check was as follows:

=========================  summary, please fix:  =========================
*  just be aware: login shell 'bash', but our code examples use 'tcsh'
*  dot file test : want 1 modifications across 3 files:

Wanted to leave this here if it's helpful at the developer end or for someone needing to install AFNI this way.

-- Robin