Can't install R on Centos 6.9

Hi,

I have the exact same issue as in Cant Install R on Ubuntu 16.04 - except that I am trying to install R for AFNI on Centos 6.9. When I try to run the code:

rPkgsInstall -pkgs ALL

I get the following error:

oo Warning:
Failed to load R_io.so with this error message:

Error in dyn.load(ll) :
unable to load shared object ‘/home/riz/abin/R_io.so’:
libXp.so.4: cannot open shared object file: No such file or directory
Calls: source … withVisible → eval → eval → set_R_io → dyn.load
Execution halted

When, I ran the following command:
afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit ELF
system: Linux
release: 2.6.32-696.13.2.el6.x86_64
version: #1 SMP Thu Oct 5 21:22:16 UTC 2017
distribution: CentOS 6.9 Final
number of CPUs: 12
apparent login shell: tcsh
shell RC file: .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /home/riz/abin/afni
afni version : afni: error while loading shared libraries: libXpm.so.4: cannot open shared object file: No such file or directory
:
AFNI_version.txt : AFNI_17.3.00, linux_openmp_64, Oct 12 2017
which python : /usr/bin/python
python version : 2.6.6
which R : /usr/bin/R
R version : R version 3.4.1 (2017-06-30) – “Single Candle”
which tcsh : /bin/tcsh

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

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

checking for R packages…
rPkgsInstall -pkgs ALL -check : FAILURE
Error in dyn.load(ll) :
unable to load shared object ‘/home/riz/abin/R_io.so’:
libXpm.so.4: cannot open shared object file: No such file or directory
Calls: source … withVisible → eval → eval → set_R_io → dyn.load
Execution halted

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

------------------------------ python libs -------------------------------
++ module ‘PyQt4’ found at /usr/lib64/python2.6/site-packages/PyQt4
++ module loaded: PyQt4

-------------------------------- env vars --------------------------------
PATH = /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/home/riz/abin:/home/riz/abin

PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH =
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 /home/riz/abin

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

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

  • AFNI programs show FAILURE
  • missing R packages (see rPkgsInstall)
  • consider running: cp /home/riz/abin/AFNI.afnirc ~/.afnirc
  • consider running “suma -update_env” for .sumarc
  • consider running: apsearch -update_all_afni_help
  • insufficient data for AFNI bootcamp

Any help would be appreciated. Thanks!

Besides R, there are other errors listed, and they all point to the libXp libraries. Try reinstalling the libXp libraries and then repeat the R installation.

deb http://security.ubuntu.com/ubuntu precise-security main

sudo apt update
sudo apt install libxp6

Since you are on CentOS, use yum to install. Try

sudo yum install libxp libxpm

  • rick