Problem with 3dSkullstrip


I am trying to run a preprocessing script but have run into the following error:

#Script is running (command trimmed):
3dSkullStrip -orig_vol -input ./__tt_head+orig -prefix ./__tt_head_ns
3dSkullStrip: error while loading shared libraries: cannot open shared object file: No such file or directory
** ERROR: Could not strip skull

** ERROR - script failed

Here is my

subject ID

subj_id=‘sub-05’ -subj_id ${subj_id}
-script rosef_proc
-out_dir rosef_proc_output
-do_block align despike tlrc
-copy_anat anat/head+orig
-tcat_remove_first_trs 22
-tlrc_base MNI152_T1_2009c+tlrc
-test_stim_files no
-volreg_align_to third
-blur_size 6
-regress_stim_times func/05/cue.1D func/05/self_look_neu.1D func/05/self_look_neg.1D func/05/self_change_neg.1D func/05/other_look_neu.1D func/05/other_look_neg.1D func/05/other_change_neg.1D func/05/rate_aff.1D func/05/rate_diff.1D func/05/relax.1D func/05/self.1D func/05/other.1D
-regress_stim_types AM1 times times times times times times times times AM1 AM1 AM1
-regress_basis_multi dmBLOCK ‘BLOCK(7,1)’ ‘BLOCK(7,1)’ ‘BLOCK(7,1)’ ‘BLOCK(7,1)’ ‘BLOCK(7,1)’ ‘BLOCK(7,1)’ ‘BLOCK(3,1)’ ‘BLOCK(3,1)’ dmBLOCK dmBLOCK dmBLOCK
-regress_stim_labels cue self_look_neu self_look_neg self_change_neg other_look_neu other_look_neg other_change_neg rate_aff rate_diff relax self other
-regress_apply_mot_types basic
-regress_censor_motion 0.3
-regress_censor_outliers 0.1
-regress_compute_tsnr yes
-jobs 4
-num_glt 6
-glt_label 1 ME_react
-gltsym ‘SYM: +self_look_neg +other_look_neg -self_look_neu -other_look_neu’
-glt_label 2 ME_reapp
-gltsym ‘SYM: +self_change_neg +other_change_neg -self_look_neg -other_look_neg’
-glt_label 3 ME_persp_set
-gltsym ‘SYM: +other -self’
-glt_label 4 ME_persp
-gltsym ‘SYM: +other_look_neu +other_look_neg +other_change_neg -self_look_neu -self_look_neg -self_change_neg’
-glt_label 5 INT_react_persp
-gltsym ‘SYM: +other_look_neg -other_look_neu -self_look_neg +self_look_neu’
-glt_label 6 INT_reapp_persp
-gltsym ‘SYM: +other_change_neg -other_look_neg -self_change_neg +self_look_neg’
-regress_run_clustsim yes

And here is the output from -check all -check_all
-------------------------------- general ---------------------------------
architecture: 64bit ELF
system: Linux
release: 3.10.0-957.el7.x86_64
version: #1 SMP Thu Oct 4 20:48:51 UTC 2018
distribution: Red Hat Enterprise Linux Server 7.6 Maipo
number of CPUs: 16
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /cm/shared/apps/afni/20.2.19/afni
afni version : Precompiled binary linux_centos_7_64: Sep 27 2020
: AFNI_20.2.19 ‘Aulus Vitellius’
AFNI_version.txt : AFNI_20.2.19, linux_centos_7_64, Sep 27 2020
which python : /usr/bin/python
python version : 2.7.5
which R : /cm/shared/apps/R/3.6.2/bin/R
R version : R version 3.6.2 (2019-12-12) – “Dark and Stormy Night”
which tcsh : /usr/bin/tcsh

instances of various programs found in PATH:
afni : 1 (/cm/shared/apps/afni/20.2.19/afni)
R : 1 (/cm/shared/apps/R/3.6.2/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 : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
Error in dyn.load(ll) :
unable to load shared object ‘/cm/shared/apps/afni/20.2.19/’: cannot open shared object file: No such file or directory
Calls: source … withVisible → eval → eval → set_R_io → dyn.load
Execution halted

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

R RHOME : /cm/shared/apps/R/3.6.2/lib64/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

** failed to load module matplotlib.pyplot
– matplotlib.pyplot is not required, but is desirable

-------------------------------- env vars --------------------------------
PATH = /cm/shared/apps/afni/20.2.19:/cm/shared/apps/R/3.6.2/bin/:/cm/shared/tools/curl/7.68.0/bin/:/cm/shared/apps/openmpi/ib/4.0.2/bin:/cm/shared/compilers/gcc/9.2.0/bin:/cm/shared/apps/slurm/18.08.4/sbin:/cm/shared/apps/slurm/18.08.4/bin:/cm/local/apps/gcc/8.2.0/bin:/cm/local/apps/environment-modules/4.2.1//bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/4.2.1/bin:/opt/puppetlabs/bin:/opt/dell/srvadmin/bin:/home/nkako/.local/bin:/home/nkako/bin

LD_LIBRARY_PATH = /cm/shared/apps/afni/20.2.19:/cm/shared/apps/R/3.6.2/lib64:/cm/shared/tools/curl/7.68.0/lib:/cm/shared/apps/lapack/gcc/64/3.8.0:/cm/shared/apps/blas/gcc/3.8.0/lib64:/cm/shared/apps/openmpi/ib/4.0.2/lib:/cm/shared/compilers/gcc/9.2.0/lib:/cm/shared/compilers/gcc/9.2.0/lib64:/cm/shared/libraries/mpc/1.0.3/lib/:/cm/shared/apps/slurm/18.08.4/lib64/slurm:/cm/shared/apps/slurm/18.08.4/lib64:/cm/local/apps/gcc/8.2.0/lib:/cm/local/apps/gcc/8.2.0/lib64


------------------------------ 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 /cm/shared/apps/afni/20.2.19

------------------------------ OS specific -------------------------------
which yum : /usr/bin/yum
yum version : 3.4.3

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

  • just be aware: login shell ‘bash’, but our code examples use ‘tcsh’
  • ‘afni’ executable is owned by root
  • AFNI programs show FAILURE
  • insufficient data for AFNI bootcamp

any help would be much appreciated, thank you!


Thanks for posting the

The first thing I notice is that “afni” is owned by root-- that strikes me as a problem with setup somehow. Is this running on some administered system, or on your own computer? I don’t think any of these programs should be installed with root permissions. That might make downstream difficulties for file permissions.

It is also odd that 3dSkullStrip runs OK in the system check, but not on the command line… But can you please doublecheck that all the dependencies from here:

are installed by running each of these “sudo yum …” commands?

sudo yum install -y epel-release
sudo yum install -y tcsh libXp openmotif gsl xorg-x11-fonts-misc       \
                    PyQt4 R-devel netpbm-progs gnome-tweak-tool ed     \
                    libpng12 xorg-x11-server-Xvfb firefox
sudo yum update -y

… and then for libGLw specifically, could you please also add this:

yum install mesa-libGLw

Does that solve the 3dSkullStrip issue?

Also, I’m a little surprised not to see any “-blocks …” option used… why is that not there?

Finally, I note that we generally recommend using @SSwarper prior to running, to both skullstrip (SS) the subj anatomical and warp it to a template space. That usually gives much nicer results for both operations.


Hi pt,

Thanks for the response! This is being run on a university owned HPC and I don’t have permissions to run the sudo commands. I will talk to our IT and see if they can work this out with me.