missing binary libraries after WSL install

Hello!
I ran into some difficulty while installing AFNI on Windows 11 via Ubuntu 22.04, specifically with missing binary libraries.

After following the installation steps online, I entered the command:
afni_system_check.py -check_all

and I received the following output:

-------------------------------- general ---------------------------------
architecture:         64bit ELF
cpu type:             x86_64
system:               Linux
release:              4.4.0-22621-Microsoft
version:              #2506-Microsoft Fri Jan 01 08:00:00 PST 2016
distribution:         ubuntu 22.04 Jammy Jellyfish
number of CPUs:       8
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /home/waterssj/abin/afni
afni version         : afni: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
                     :
AFNI_version.txt     : AFNI_24.0.14, linux_ubuntu_16_64, Mar 18 2024, official
which python         : /usr/bin/python
python version       : 3.10.12
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   (/home/waterssj/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                 : FAILURE
        afni: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
    suma                 : FAILURE
        suma: error while loading shared libraries: libGLw.so.1: cannot open shared object file: No such file or directory
    3dSkullStrip         : FAILURE
        3dSkullStrip: error while loading shared libraries: libGLw.so.1: cannot open shared object file: No such file or directory
    3dAllineate          : success
    3dRSFC               : FAILURE
        3dRSFC: error while loading shared libraries: libgsl.so.19: cannot open shared object file: No such file or directory
    SurfMesh             : FAILURE
        SurfMesh: error while loading shared libraries: libGLw.so.1: cannot open shared object file: No such file or directory
    3dClustSim           : success
    uber_subject.py      : success
    3dMVM                : success

** missing 5 binary libraries across 5 programs

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

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

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

R RHOME : /usr/lib/R

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

++ module loaded: matplotlib.pyplot
   module file : /home/waterssj/.local/lib/python3.10/site-packages/matplotlib/pyplot.py
   matplotlib version : 3.8.3

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

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

-------------------------------- env vars --------------------------------
PATH                       = /home/waterssj/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/Python38/Scripts/:/mnt/c/Program Files/Python38/:/mnt/c/Program Files/Python37/Scripts/:/mnt/c/Program Files/Python37/:/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/MATLAB/R2022b/bin:/mnt/c/Program Files/MATLAB/R2021b/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Users/water/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/water/AppData/Local/GitHubDesktop/bin:/snap/bin:/home/waterssj/abin

PYTHONPATH                 =
R_LIBS                     = /home/waterssj/R
LD_LIBRARY_PATH            =
DYLD_LIBRARY_PATH          =
DYLD_FALLBACK_LIBRARY_PATH =
CONDA_SHLVL                =
CONDA_DEFAULT_ENV          =

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

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

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

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

   -- good: .tcshrc seems to contain 'source .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 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 (975485M Avail)
           top history: ... [gangc]: redo 0.BGA as 1.bga and update run.MSS.txt
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/waterssj/abin

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

have Ubuntu system: ubuntu 22.04 Jammy Jellyfish

=========================  summary, please fix:  =========================
*  just be aware: login shell 'bash', but our code examples use 'tcsh'
*  AFNI programs show FAILURE
*  missing binary library: libXm.so.4
*  missing binary library: libGLw.so.1
*  missing binary library: libGLU.so.1
*  missing binary library: libgsl.so.19
*  missing binary library: libgslcblas.so.0
*  missing program: Xvfb
*  please run: "suma -update_env" for .sumarc
*  dot file test : want 1 modifications across 3 files:

I tried fixing the error by running the command:
suma -update_env

but I received the following output:
suma: error while loading shared libraries: libGLw.so.1: cannot open shared object file: No such file or directory

I also tried updating the binaries by entering the command:
@update.afni.binaries -d

but I received the following output:

-- running @update.afni.binaries version 3.24, December 7, 2023
-- have AFNI binaries under /home/waterssj/abin
-- have current build label official
-- install dir: using existing /home/waterssj/abin
afni: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
** failed setting package from 'afni -ver'
   checking AFNI_version.txt instead...
** failed setting package from 'AFNI_version.txt', failing

It appears that the issue has something to do with missing binary libraries, but updating the binaries doesn't work.
I'd greatly appreciate any help with fixing the issue!

Howdy-

It looks like you are missing several of the dependencies for AFNI. Can you please follow the steps here for those:
Install prerequisite packages
and then see if that sorts things?

--pt

Thanks for the reply,

I re-installed the prerequisite packages, and everything seems to work now!

Great to know, thanks!

--pt