missing R packages (see rPkgsInstall)

Hi there
I am trying to install AFNI for the first time on Windows 10: Windows Subsystem for Linux. i am using version of ubuntu of Ubuntu 20.04 LTS
i tried all the suggested solutions on the internet and the message board of afni but still when i run “afni_system_check.py -check_all” command get this output:

osman@DESKTOP-A849Q2J:~$ afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit ELF
system: Linux
release: 4.4.0-19041-Microsoft
version: #1237-Microsoft Sat Sep 11 14:32:00 PST 2021
distribution: ubuntu 20.04 focal
number of CPUs: 8
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /home/osman/abin/afni
afni version : Precompiled binary linux_ubuntu_16_64: Feb 18 2022
: AFNI_22.0.11 ‘Hadrian’
AFNI_version.txt : AFNI_22.0.11, linux_ubuntu_16_64, Feb 18 2022
which python : /usr/bin/python
python version : 3.8.10
which R : /usr/bin/R
R version : R version 4.1.2 (2021-11-01) – “Bird Hippie”
which tcsh : /usr/bin/tcsh

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

** have python3 but not python2

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 : 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: lmerTest!

R RHOME : /usr/lib/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

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

-------------------------------- env vars --------------------------------
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2022.8.0_x64__79rhkp1fndgsc:/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/Polyspace/R2020a/runtime/win64:/mnt/c/Program Files/Polyspace/R2020a/bin:/mnt/c/Program Files/Polyspace/R2020a/polyspace/bin:/mnt/c/Users/Lab/AppData/Local/Microsoft/WindowsApps:/snap/bin:/home/osman/abin

PYTHONPATH =
R_LIBS = /home/osman/R

LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

------------------------------ data checks -------------------------------
data dir : found AFNI_data6 under $HOME (475207M Avail)
top history: 20 Feb 2020 [rickr]: updated FT_analysis examples
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/osman/abin

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

have Ubuntu system: ubuntu 20.04 focal
have Ubuntu afni : Precompiled binary linux_ubuntu_16_64: Feb 18 2022

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

  • just be aware: login shell ‘bash’, but our code examples use ‘tcsh’
  • missing R packages (see rPkgsInstall)

R package dependencies… sigh. Yes, they can be tricky, unfortunately.

To start, can we check with PPAs you have added as part of your installation? What is the output of this command:


grep -H ppa /etc/apt/sources.list.d/* /etc/apt/sources.list

At present (future readers: these can change; indeed, we have updated these in the past couple months to keep up with R), there should be these two listed from here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_linux_ubuntu20.html#slow-setup-install-prerequisite-packages


sudo add-apt-repository -y "ppa:marutter/rrutter4.0"
sudo add-apt-repository -y "ppa:c2d4u.team/c2d4u4.0+"

–pt

thank you:
here is the output of the mentioned command grep -H ppa /etc/apt/sources.list.d/* /etc/apt/sources.list

osman@DESKTOP-A849Q2J:~$ grep -H ppa /etc/apt/sources.list.d/* /etc/apt/sources.list
/etc/apt/sources.list.d/c2d4u_team-ubuntu-c2d4u4_0_-focal.list:deb http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal main
/etc/apt/sources.list.d/c2d4u_team-ubuntu-c2d4u4_0_-focal.list:# deb-src http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal main
/etc/apt/sources.list.d/c2d4u_team-ubuntu-c2d4u4_0_-focal.list.save:deb http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal main
/etc/apt/sources.list.d/c2d4u_team-ubuntu-c2d4u4_0_-focal.list.save:# deb-src http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal main
/etc/apt/sources.list.d/marutter-ubuntu-rrutter4_0-focal.list:deb http://ppa.launchpad.net/marutter/rrutter4.0/ubuntu focal main
/etc/apt/sources.list.d/marutter-ubuntu-rrutter4_0-focal.list:# deb-src http://ppa.launchpad.net/marutter/rrutter4.0/ubuntu focal main
/etc/apt/sources.list.d/marutter-ubuntu-rrutter4_0-focal.list.save:deb http://ppa.launchpad.net/marutter/rrutter4.0/ubuntu focal main
/etc/apt/sources.list.d/marutter-ubuntu-rrutter4_0-focal.list.save:# deb-src http://ppa.launchpad.net/marutter/rrutter4.0/ubuntu focal main

OK, that looks like what I have on my Ubuntu 20.04 OS (though mine is not WSL-Ubuntu).

What happens if you run:


# from a tcsh shell:
Rscript -e "install.packages(c('Rcpp','brms'), dependencies = TRUE, INSTALL_opts = '--no-lock')"  |& tee o.rscript.txt

# ... or, from a bash shell:
Rscript -e "install.packages(c('Rcpp','brms'), dependencies = TRUE, INSTALL_opts = '--no-lock')"  2>&1 | tee o.rscript.txt

?

It might work best if you please send me the output “o.rscript.txt” file that is created, logging the terminal output—if you click on my username above, you will see my email.

–pt

OK, is sent the output of:
Rscript -e “install.packages(c(‘Rcpp’,‘brms’), dependencies = TRUE, INSTALL_opts = ‘–no-lock’)” 2>&1 | tee o.rscript.txt
to your E-mail.
thank you ptaylor!

Thanks—from sharing that, and a couple emails of testing things, it seems that the following error message was the key one in the R package install output:


------------------ CMAKE NOT FOUND --------------------

CMake was not found on the PATH. Please install CMake:

 - yum install cmake          (Fedora/CentOS; inside a terminal)
 - apt install cmake          (Debian/Ubuntu; inside a terminal).
 - pacman -S cmake            (Arch Linux; inside a terminal).
 - brew install cmake         (MacOS; inside a terminal with Homebrew)
 - port install cmake         (MacOS; inside a terminal with MacPorts)

Alternatively install CMake from: <https://cmake.org/>

-------------------------------------------------------

I wonder if WSL-Ubuntu didn’t have this, whereas “normal” Ubuntu does, upon install? Regardless, I think we will add ‘cmake’ to the list of aptitude installs.

After installing Cmake, re-running the “rPkgsInstall -pkgs ALL” command appears to have done the job properly. The final “afni_system_check.py -check_all” ended up being happy.

–pt