libgsl.so.19

I faced the error 3dRSFC: error while loading shared libraries: libgsl.so.19:

i can't run the 3dReHo command for this error

my afni version - (Version AFNI_23.2.02)

Howdy-

It would be great to see the full afni -ver output, so we can see the OS you are using, but actually the most useful thing might just be to see the full output of:

afni_system_check.py -check_all

.... if you could please copy+paste that here.

--pt

-------------------------------- general ---------------------------------
architecture:         64bit ELF
cpu type:             x86_64
system:               Linux
release:              4.4.0-19041-Microsoft
version:              #2311-Microsoft Tue Nov 08 17:09:00 PST 2022
distribution:         ubuntu 22.04 Jammy Jellyfish
number of CPUs:       4
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /home/badol/abin/afni
afni version         : Precompiled binary linux_ubuntu_16_64: Jul 28 2023
                     : AFNI_23.2.02 'Marcus Didius Severus Julianus'
AFNI_version.txt     : AFNI_23.2.02, linux_ubuntu_16_64, Jul 28 2023, official
which python         : /usr/bin/python
python version       : 3.10.6
which R              : /usr/bin/R
R version            : R version 4.3.1 (2023-06-16) -- "Beagle Scouts"

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

** have python3 but not python2

testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : FAILURE
        3dSkullStrip: error while loading shared libraries: libgsl.so.19: cannot open shared object file: Error 40
    3dAllineate          : success
    3dRSFC               : FAILURE
        3dRSFC: error while loading shared libraries: libgsl.so.19: cannot open shared object file: Error 40
    SurfMesh             : success
    3dClustSim           : success
    uber_subject.py      : success
    3dMVM                : success

** missing binary library 'libgsl.so.19' across 2 programs

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

which tcsh           : /usr/bin/tcsh
which Xvfb           : /usr/bin/Xvfb

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

R RHOME : /usr/lib/R

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

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

-------------------------------- env vars --------------------------------
PATH = /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/mnt/c/Users/User/install/bin/:/Users/User/ANTs/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/VMware/VMware Player/bin/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/PostgreSQL/10/lib:/mnt/c/Program Files/PostgreSQL/10/bin:/mnt/c/Program Files/dotnet/:/mnt/c/Users/User/anaconda3:/mnt/c/Users/User/anaconda3/Library/mingw-w64/bin:/mnt/c/Users/User/anaconda3/Library/usr/bin:/mnt/c/Users/User/anaconda3/Library/bin:/mnt/c/Users/User/anaconda3/Scripts:/mnt/c/Users/User/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/User/AppData/Roaming/npm:/mnt/c/Users/User/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:/home/badol/abin

PYTHONPATH =
R_LIBS = /home/badol/R

LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

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

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

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

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

   -- good: .tcshrc seems to contain 'source .cshrc'
   -- considered operations: path, flatdir, apsearch
      (not on a mac, should skip flatdir)

   -- 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 3 files:

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

------------------------------ data checks -------------------------------
data dir : found AFNI_data6   under $HOME (121874M Avail)
           top history: ...3 [rickr]: renamed GroupAna_cases scripts and output
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/badol/abin

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

have Ubuntu system: ubuntu 22.04 Jammy Jellyfish
have Ubuntu afni  : Precompiled binary linux_ubuntu_16_64: Jul 28 2023

=========================  summary, please fix:  =========================
*  just be aware: login shell 'bash', but our code examples use 'tcsh'
*  AFNI programs show FAILURE
*  missing binary library: libgsl.so.19
*  dot file test : want 1 modifications across 3 files:

Cool, thanks.

You are using Ubuntu 22.04, and the setup notes for that are here.

The specific message is about libgsl not being linked; that could be because either the package isn't installed or the link isn't created, or both. To make sure that that dependency is present, and then while we're at it to make sure no other dependencies are missing, could you please copy+paste the few commands in this section of the notes, "Install prerequisite packages"? Importantly, the third step there includes making the link for GSL.

After you run that, could you open up a new terminal, and see if afni_system_check.py -check_all still reports those program errors?

--pt

sudo ln -s /usr/lib/x86_64-linux-gnu/libgsl.so.27 /usr/lib/x86_64-linux-gnu/libgsl.so.19

i already ran the command but after that when i ran the afni_system_check.py -check_all it give me same results

Hmmm, OK. What is the output of:

ls -l /usr/lib/x86_64-linux-gnu/libgsl*

on your system?

--pt

-rw-r--r-- 1 root root 5727436 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.a
lrwxrwxrwx 1 root root      16 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.so -> libgsl.so.27.0.0
lrwxrwxrwx 1 root root      38 Aug  8 13:00 /usr/lib/x86_64-linux-gnu/libgsl.so.19 -> /usr/lib/x86_64-linux-gnu/libgsl.so.23
lrwxrwxrwx 1 root root      38 Aug  8 09:38 /usr/lib/x86_64-linux-gnu/libgsl.so.23 -> /usr/lib/x86_64-linux-gnu/libgsl.so.19
lrwxrwxrwx 1 root root      16 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.so.27 -> libgsl.so.27.0.0
-rw-r--r-- 1 root root 2873384 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.so.27.0.0
-rw-r--r-- 1 root root  474946 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgslcblas.a
lrwxrwxrwx 1 root root      20 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgslcblas.so -> libgslcblas.so.0.0.0
lrwxrwxrwx 1 root root      20 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgslcblas.so.0 -> libgslcblas.so.0.0.0
-rw-r--r-- 1 root root  264320 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgslcblas.so.0.0.0

OK, these seem a bit tangled, because there are some circular links:

lrwxrwxrwx 1 root root      16 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.so -> libgsl.so.27.0.0
lrwxrwxrwx 1 root root      38 Aug  8 13:00 /usr/lib/x86_64-linux-gnu/libgsl.so.19 -> /usr/lib/x86_64-linux-gnu/libgsl.so.23
lrwxrwxrwx 1 root root      38 Aug  8 09:38 /usr/lib/x86_64-linux-gnu/libgsl.so.23 -> /usr/lib/x86_64-linux-gnu/libgsl.so.19
lrwxrwxrwx 1 root root      16 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.so.27 -> libgsl.so.27.0.0

I think the important ones to have are:

  • /usr/lib/x86_64-linux-gnu/libgsl.so.27 -> libgsl.so.27.0.0
  • and we have to create /usr/lib/x86_64-linux-gnu/libgsl.so.19 pointing to /usr/lib/x86_64-linux-gnu/libgsl.so.27

On Ubuntu 22.04, I don't think there should be one with version number ending in 23, so let's unlink that:

sudo unlink /usr/lib/x86_64-linux-gnu/libgsl.so.23

Then, run this command to create the link specified in the install instructions:

sudo ln -s /usr/lib/x86_64-linux-gnu/libgsl.so.27 /usr/lib/x86_64-linux-gnu/libgsl.so.19

What do the outputs of:

ls -l /usr/lib/x86_64-linux-gnu/libgsl*

afni_system_check.py -check_all

look like after that?

--pt

Hi,

I'm having a similar problem trying to run 3dlme with an error regarding missing binary library: libgsl.so.0 and tried the suggested steps without success.

My output of afni_system_check.py -check_all is:

-------------------------------- general ---------------------------------
architecture:         64bit ELF
cpu type:             x86_64
system:               Linux
release:              6.5.0-25-generic
version:              #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2
distribution:         Ubuntu 22.04.3 LTS
number of CPUs:       128
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /usr/local/abin/afni
afni version         : Precompiled binary linux_openmp_64: Dec  8 2023 
                     : AFNI_23.3.13 'Septimius Severus'
AFNI_version.txt     : AFNI_23.3.13, linux_openmp_64, Dec 08 2023, official
which python         : /home/tug84242@tu.temple.edu/anaconda3/bin/python
python version       : 3.11.5
which R              : /usr/bin/R
R version            : R version 4.3.3 (x86_64-pc-linux-gnu)

instances of various programs found in PATH:
    afni    : 1   (/usr/local/abin/afni)
    R       : 1   (/usr/bin/R)
    python  : 2 
      /home/tug84242@tu.temple.edu/anaconda3/bin/python3.11
      /usr/bin/python3.10
    python2 : 0 
    python3 : 2 
      /home/tug84242@tu.temple.edu/anaconda3/bin/python3.11
      /usr/bin/python3.10

** have python3 but not python2

testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : FAILURE
        3dSkullStrip: error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory
    3dAllineate          : success
    3dRSFC               : FAILURE
        3dRSFC: error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory
    SurfMesh             : success
    3dClustSim           : success
    uber_subject.py      : success
    3dMVM                : success

** missing binary library 'libgsl.so.0' across 2 programs

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

which tcsh           : /usr/bin/tcsh
which Xvfb           : /usr/bin/Xvfb

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

R RHOME : /usr/lib/R

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

++ module loaded: matplotlib.pyplot
   module file : /home/tug84242@tu.temple.edu/anaconda3/lib/python3.11/site-packages/matplotlib/pyplot.py
   matplotlib version : 3.7.2

++ module loaded: flask
   module file : /home/tug84242@tu.temple.edu/anaconda3/lib/python3.11/site-packages/flask/__init__.py
   flask version : 2.2.2

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

-------------------------------- env vars --------------------------------
PATH = /home/tug84242@tu.temple.edu/anaconda3/bin:/home/tug84242@tu.temple.edu/anaconda3/condabin:/usr/local/fsl/share/fsl/bin:/usr/local/fsl/share/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/abin

PYTHONPATH = 
R_LIBS = 
LD_LIBRARY_PATH = 
DYLD_LIBRARY_PATH = 
DYLD_FALLBACK_LIBRARY_PATH = 

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

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

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

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

   -- no .tcshrc, will create one as a follower of .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 3 modifications across 3 files:
   
      file             path  flatdir  apsearch        follower
      ---------------  ----  -------  --------        --------
      .cshrc           1     0        1               0     
      .tcshrc          0     0        0               1     
      .bashrc          1     0        0               0     
   
------------------------------ data checks -------------------------------
data dir : found AFNI_data6   under $HOME (959827M Avail)
           top history: ...ickr]: add regress block to -radial_correlate_blocks
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 /usr/local/abin

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

have Ubuntu system: Ubuntu 22.04.3 LTS

=========================  summary, please fix:  =========================
*  just be aware: login shell 'bash', but our code examples use 'tcsh'
*  AFNI programs show FAILURE
*  missing binary library: libgsl.so.0
*  dot file test : want 3 modifications across 3 files:

I installed the prerequisite packages listed in the documentation, and I believe I have the two important links listed:

/usr/lib/x86_64-linux-gnu/libgsl.so.27 -> libgsl.so.27.0.0

/usr/lib/x86_64-linux-gnu/libgsl.so.19 -> /usr/lib/x86_64-linux-gnu/libgsl.so.27

My output of ls -l /usr/lib/x86_64-linux-gnu/libgsl* is:

lrwxrwxrwx 1 root root      20 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgslcblas.so.0 -> libgslcblas.so.0.0.0
-rw-r--r-- 1 root root  264320 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgslcblas.so.0.0.0
lrwxrwxrwx 1 root root      38 Dec 11 18:31 /usr/lib/x86_64-linux-gnu/libgsl.so.19 -> /usr/lib/x86_64-linux-gnu/libgsl.so.27
lrwxrwxrwx 1 root root      16 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.so.27 -> libgsl.so.27.0.0
-rw-r--r-- 1 root root 2873384 Dec  6  2021 /usr/lib/x86_64-linux-gnu/libgsl.so.27.0.0

Any help would be much appreciated.
Thank you!

Those links look appropriate, indeed.

Ah, I think the issue is that your OS is Ubuntu 22.04, but you have a different Linux package, the openmp_64 one:

Can you update your binaries to use Ubuntu-built ones, like this:

@update.afni.binaries -package linux_ubuntu_16_64 -do_extras

?

I think that will make use of the links. Please let us know how the system check looks after that.

--pt

Thank you for your reply!

I tried to run @update.afni.binaries -package linux_ubuntu_16_64 -do_extras, which led to

-- running @update.afni.binaries version 3.24, December 7, 2023
-- have AFNI binaries under /usr/local/abin
-- have current build label official
-- install dir: using existing /usr/local/abin
-- any downloads will be from https://afni.nimh.nih.gov via wget

-- attempting to install package linux_ubuntu_16_64 under
   install dir: /usr/local/abin...
-- have install dir
** you do not have write permissions in the install directory
   (install dir = /usr/local/abin)

Because of the permissions issues, I attempted to run sudo @update.afni.binaries -package linux_ubuntu_16_64 -do_extras, which led to the following error:

sudo: @update.afni.binaries: command not found

My apologies if this is a naive problem, but do you have any suggestions for that?

Oh. Are you on an administered system? Usually we install the AFNI binaries into the home directory, specifically defaulting to ~/abin, so that users have write permissions easily and can update the AFNI binaries at will.

I'm guessing that someone else set up that system, then? You might have to go to that administrator to have them update things.

--pt

I do have administrator access on the system and installed AFNI myself in the home directory. I was asked for my sudo password after running sudo @update.afni.binaries -package linux_ubuntu_16_64 -do_extras, but then got the error that the command wasn't found.

Your AFNI binaries don't appear to be in home, which would be under /home/USERNAME/...., but instead are under /usr/local/....., as reported in the afni_system_check.py output:

You should avoid using sudo ... with the install, so that your username will own the binaries, not root.

We have setup instructions for Ubuntu 22.04 here, and those put the binaries into the home directory.

If it were my system, I would remove the abin directory from /usr/local (or at least remove that from the $path), and then do the install into the /home/USERNAME/abin, following the instructions linked above.

--pt

Thank you for catching this! It solved my problem.

Rockin', glad that sorted it.

--pt