Updated AFNI and no longer pass afni_system_check: libgsl.so.0: cannot open shared object file

Hi!

I updated AFNI om my ubuntu 18 machine:


Precompiled binary linux_openmp_64: Feb 14 2020 (Version AFNI_20.0.09 'Galba')

I ran


afni_system_check -check_all

And ran into some expected problems (like an R-package missing due to, I presume, new functionality). But the real problem here are these errors:


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
    uber_subject.py      : success
    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
    3dMVM                : success

I.e. the problem is libgsl.so.0. It also complained about libxp6 but I could fix that (sudo -E apt-get install libxp6).

I found a post on the message board here which suggested to install the GNU Science Toolbox via


sudo -E apt-get install libgsl0ldbl

But that command tells me that


However the following packages replace it:
  libgsl23 libgslcblas0:i386 libgsl23:i386 libgslcblas0

E: Package 'libgsl0ldbl' has no installation candidate

And libgsl23 is already installed. I don’t seem to have the libgsl.so.0 file. This is the content:


ls /usr/lib/x86_64-linux-gnu/libgsl*
/usr/lib/x86_64-linux-gnu/libgslcblas.so.0  /usr/lib/x86_64-linux-gnu/libgslcblas.so.0.0.0  /usr/lib/x86_64-linux-gnu/libgsl.so.19  /usr/lib/x86_64-linux-gnu/libgsl.so.23  /usr/lib/x86_64-linux-gnu/libgsl.so.23.0.0

I exported this variable so that AFNI sees


LD_LIBRARY_PATH = /usr/lib/x86_64-linux-gnu/

And I ran according the installation guide:


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

But nothing seems to help. Google confuses me since all posts assume that you have the libgsl.so.0 file.

Any ideas?! Thanks!

I found another answer from Paul Taylor and that fixed it. Sorry, I can’t delete this but perhaps it will help someone else.

Solution:


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

Hi, Robin-

Yes, I think that GSL linking step is part of the install instructions—it probably just got missed on the first pass through.

No worries about leaving the thread up—having evidence that this “Paul Taylor” character occasionally provides helpful answers is reason enough to preserve it!

–pt

Thanks!

I could only find this part regarding libgsl.so in the installation guide (Ubuntu18):


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

That does not cover linking libgsl.so.19 (or libgsl.so.23) to libgsl.so.0.
The installation guide worked nicely when I installed AFNI and this libgsl.so.0 issue surfaced after I updated AFNI. Prior to the update e.g. skullstrip worked fine.

I already hold this “Paul Taylor” to high standards since 2015 when he made my last minute trip to the boot camp in Cape Town work out superbly. Including sightseeing!

Ah, now I am reading your original post more carefully, and I see the GSL version number differences I had skipped over… Interesting. What is your:


lsb_release -a

?

I also notice that your OS is Ubuntu, but you seem to be using the linux_openmp_64 binaries of AFNI. I wonder if you wouldn’t have this issue if you used the Ubuntu version of AFNI binaries. Using the OpenMP ver might cause some issues with dependencies, I think one with libXp.so.6 if using the OpenMP_64 on Ubuntu. (And that might be the reason for the GSL enumeration differences, too, in the required links.)

I use the linux_ubuntu_12_64 on my Ubuntu 18.04.*, and that has been trouble-free with installations; note that is also does have OpenMP enabled for under-the-hood parallelization, similar to the linux_openmp_64 ones.

If you want to swap over, then you could:


@update.afni.binaries -package linux_ubuntu_12_64 -do_extras

Yep, the UCT Bootcamp was good times for all!

–pt

Hi and thanks!

I did screw up, I pasted my previous installation command and that was on a CentOS system. I removed the abin directory completely, downloaded the source from here due to proxy-issues. Then I went to my local home-folder and ran


curl -O https://afni.nimh.nih.gov/pub/dist/bin/linux_ubuntu_16_64/@update.afni.binaries

Followed by


tcsh @update.afni.binaries -local_package /home/robka/linux_ubuntu_16_64.tgz  -do_extras -bindir /usr/local/abin

Unfortunately the problem persists.


lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic


afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture:         64bit 
system:               Linux
release:              4.15.0-51-generic
version:              #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019
distribution:         Ubuntu 18.04 bionic
number of CPUs:       40
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_ubuntu_16_64: Feb 14 2020 
                     : AFNI_20.0.09 'Galba'
AFNI_version.txt     : AFNI_20.0.09, linux_ubuntu_16_64, Feb 14 2020
which python         : /usr/bin/python
python version       : 2.7.15+
which R              : /usr/bin/R
R version            : R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
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/python2.7)
    python2 : 1   (/usr/bin/python2.7)
    python3 : 1   (/usr/bin/python3.6)


testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    uber_subject.py      : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success
    3dMVM                : success

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

R RHOME : /usr/lib/R

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

------------------------------ python libs -------------------------------
++ module loaded: PyQt4
   module file : /usr/lib/python2.7/dist-packages/PyQt4/__init__.pyc

++ module loaded: matplotlib.pyplot
   module file : /usr/lib/python2.7/dist-packages/matplotlib/pyplot.pyc

-------------------------------- env vars --------------------------------
PATH = /usr/local/fsl/bin:/home/robka/.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/MATLAB/R2015b/bin:/usr/local/mricron_lx:/usr/local/xnat_img_download:/usr/local/stim_file_gen:/usr/local/mricron_old:/usr/local/xnat_resource_downloader:/opt/thinlinc/bin:/usr/local/abin:/usr/local/abin

PYTHONPATH = /usr/local/pylib_shared

R_LIBS = /usr/lib/R

LD_LIBRARY_PATH = /usr/lib/x86_64-linux-gnu/

DYLD_LIBRARY_PATH = 
DYLD_FALLBACK_LIBRARY_PATH = 

------------------------------ 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 1.6.11 (amd64)

have Ubuntu system: Ubuntu 18.04 bionic
have Ubuntu afni  : Precompiled binary linux_ubuntu_16_64: Feb 14 2020 

=========================  summary, please fix:  =========================
*  login shell 'bash', trusting user to translate code examples from 'tcsh'
*  shell bash: consider sourcing (non-login) .bashrc from (login) .profile
*  please run: cp /usr/local/abin/AFNI.afnirc ~/.afnirc
*  please run: "suma -update_env" for .sumarc
*  insufficient data for AFNI bootcamp

Proc-Blocks


-blocks despike tshift align tlrc volreg mask scale regress \
    -mask_segment_anat yes \
    -mask_segment_erode yes \
    -tshift_opts_ts -tpattern seq+z \
    -align_opts_aea -ginormous_move -deoblique on -cost lpc+zz \
    -tcat_remove_first_trs 0 \
    -tlrc_base MNI_avg152T1+tlrc \
    -volreg_tlrc_warp \
    -volreg_align_to MIN_OUTLIER \
    -volreg_align_e2a \
    -regress_censor_outliers 0.1 \
    -regress_apply_mot_types demean deriv \
    -regress_stim_types AM1 \
    -regress_basis 'dmBLOCK' \
    -regress_stim_times $stim/* \

Error-Output


3dSkullStrip -orig_vol -input ./__tt_T1+orig -prefix ./__tt_T1_ns
*+ WARNING:   If you are performing spatial transformations on an oblique dset, 
  such as ./__tt_T1+orig.BRIK,
  or viewing/combining it with volumes of differing obliquity,
  you should consider running: 
     3dWarp -deoblique 
  on this and  other oblique datasets in the same session.
 See 3dWarp -help for details.
++ Oblique dataset:./__tt_T1+orig.BRIK is 4.693148 degrees from plumb.
#Script is running (command trimmed):
  3dinfo ./__tt_T1_ns+orig | \grep 'Data Axes Tilt:'|\grep 'Oblique'
#++ Dataset /fenix/users/irepe/scn9a/M_sub01_run1.results/__tt_T1_ns+orig is not oblique
#Script is running (command trimmed):
  3dinfo ./vr_base_min_outlier+orig | \grep 'Data Axes Tilt:'|\grep 'Oblique'
#++ Dataset /fenix/users/irepe/scn9a/M_sub01_run1.results/vr_base_min_outlier+orig is ***oblique****
#Script is running:
  3dAttribute DELTA /fenix/users/irepe/scn9a/M_sub01_run1.results/__tt_T1_ns+orig
#++ Spacing for anat to oblique epi alignment is 0.868056
#Script is running (command trimmed):
  3dcopy ./__tt_T1_ns+orig ./__tt_T1_ns_ob; @Align_Centers -base ./vr_base_min_outlier+orig -dset ./__tt_T1_ns_ob+orig -no_cp
++ 3dcopy: AFNI version=AFNI_20.0.09 (Feb 14 2020) [64-bit]
*+ WARNING:   If you are performing spatial transformations on an oblique dset, 
  such as ./vr_base_min_outlier+orig.BRIK,
  or viewing/combining it with volumes of differing obliquity,
  you should consider running: 
     3dWarp -deoblique 
  on this and  other oblique datasets in the same session.
 See 3dWarp -help for details.
++ Oblique dataset:./vr_base_min_outlier+orig.BRIK is 8.172770 degrees from plumb.
++ 3drefit: AFNI version=AFNI_20.0.09 (Feb 14 2020) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset ./__tt_T1_ns_ob+orig
 + deoblique
++ 3drefit processed 1 datasets
else: endif not found.
#Script is running (command trimmed):
  cat_matvec ./__tt_T1_ns_ob_shft.1D -I > ./__tt_T1_ns_shft_I.1D
** ERROR: mri_read_double_ascii: couldn't open file ./__tt_T1_ns_ob_shft.1D
** ERROR: THD_read_dvecmat: can't read matrix+vector from './__tt_T1_ns_ob_shft.1D'
** FATAL ERROR: Can't read matrix from './__tt_T1_ns_ob_shft.1D'

It would have made so much sense if installing the correct binaries solved this problem…

Hmm, OK; do you mind uploading the data and I will take a look directly? I will PM you the upload instructions.

–pt