Open SSH connection to cluster R fails to start

Hello,
I can use Positron to remote SSH to my cluster and run a Python session but I get the following if I start an R session:

R 4.5.0 failed to start up (exit code -1)

The process exited abnormally (signal: 6 (SIGABRT))

The kernel output returns:


r-2ac67474 ** Begin kernel log for session R 4.5.0 (r-2ac67474) at 3/7/2026, 6:27:25 AM **
r-2ac67474 Streaming kernel log file: /tmp/kernel-GJxDFa/kernel.log
r-2ac67474 [R] 2026-03-07T14:27:26.156004Z ERROR Panic! In file 'crates/harp/src/library.rs' at line 23: The R shared library at '/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v4/Compiler/gcccore/r/4.5.0/lib64/R/lib/libR.so' could not be opened: DlOpen { desc: "libdeflate.so.0: cannot open shared object file: No such file or directory" }
r-2ac67474 [R]
r-2ac67474 [R] Backtrace:
r-2ac67474 [R] 0:
r-2ac67474 [R] 1:
r-2ac67474 [R] 2:
r-2ac67474 [R] 3:
r-2ac67474 [R] 4:
r-2ac67474 [R] 5:
r-2ac67474 [R] 6:
r-2ac67474 [R] 7:
r-2ac67474 [R] 8:
r-2ac67474 [R] 9:
r-2ac67474 [R] 10:
r-2ac67474 [R] 11:
r-2ac67474 [R] 12:
r-2ac67474 [R] 13:
r-2ac67474 [R] 14:
r-2ac67474 [R] 15:
r-2ac67474 [R] 16: __libc_start_call_main
r-2ac67474 [R] 17: __libc_start_main@GLIBC_2.2.5
r-2ac67474 [R] 18:
r-2ac67474 [R]
r-2ac67474 [R] at crates/ark/src/main.rs:399
r-2ac67474 [R]

Also, I can run an R session on the cluster from Positron's terminal.

Any help is appreciated.
Thank you,
Jean-Noel

I would guess that this is due to LD_LIBRARY_PATH being different in your Terminal vs. Positron's Console.

Can you run this in Python?

import os
os.getenv("LD_LIBRARY_PATH")

And this in the Terminal (where R works):

echo $LD_LIBRARY_PATH
ldd /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v4/Compiler/gcccore/r/4.5.0/lib64/R/lib/libR.so

Finally, after sharing the output of those commands, does checking this box in Settings help?

1 Like

Hi Jonathan,

Thank you for your help.

The python command returns:

import os
... os.getenv("LD_LIBRARY_PATH")
'/home/jcandau/software/lib'

The terminal commands:

$ echo $LD_LIBRARY_PATH

/home/jcandau/software/lib

$ ldd /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v4/Compiler/gcccore/r/4.5.0/lib64/R/lib/libR.so

linux-vdso.so.1 (0x00007ffdcdddd000)

libflexiblas.so.3 => /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Core/flexiblascore/3.3.1/lib64/libflexiblas.so.3 (0x00007f9d57800000)

.. and a bunch of other libraries but my "New user" status prevents me from having more than 4 links in my reply (paths seems to be interpreted as links by the forum bot)

Checking the kernel supervisor to run kernels in login shell did not fix the problem.

Jean-Noël

1 Like

OK, thanks. Is your organization using environment modules, by chance?

The ldd command should have emitted the path to libdeflate.so.0. Can you paste the full ldd output? If you paste it in a code fence (triple backticks) you won't encounter the link limit.

For context, I think what we need to do is to figure out which directory contains this library and then instruct Positron to add that directory to LD_LIBRARY_PATH. That's happening already in your terminal via some other mechanism.

1 Like

Yes, we are using modules. I have to load R to use it.
Here is the full result of the ldd command:

 ldd /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v4/Compiler/gcccore/r/4.5.0/lib64/R/lib/libR.so
        linux-vdso.so.1 (0x00007ffd1a07d000)
        libflexiblas.so.3 => /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Core/flexiblascore/3.3.1/lib64/libflexiblas.so.3 (0x00007f1f7ea00000)
        libgfortran.so.5 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib/gcc/x86_64-pc-linux-gnu/14/libgfortran.so.5 (0x00007f1f7e600000)
        libm.so.6 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libm.so.6 (0x00007f1f7f31e000)
        libreadline.so.8 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libreadline.so.8 (0x00007f1f7f2c9000)
        libpcre2-8.so.0 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libpcre2-8.so.0 (0x00007f1f7e964000)
        libdeflate.so.0 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libdeflate.so.0 (0x00007f1f7f2b5000)
        libzstd.so.1 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libzstd.so.1 (0x00007f1f7e547000)
        liblzma.so.5 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/liblzma.so.5 (0x00007f1f7f286000)
        libbz2.so.1 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libbz2.so.1 (0x00007f1f7edeb000)
        libz.so.1 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libz.so.1 (0x00007f1f7e949000)
        libicuuc.so.73 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libicuuc.so.73 (0x00007f1f7e35c000)
        libicui18n.so.73 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libicui18n.so.73 (0x00007f1f7e000000)
        libgomp.so.1 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib/gcc/x86_64-pc-linux-gnu/14/libgomp.so.1 (0x00007f1f7dfab000)
        libc.so.6 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libc.so.6 (0x00007f1f7ddd6000)
        /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/lib64/ld-linux-x86-64.so.2 (0x00007f1f7f425000)
        libcpupower.so.0 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libcpupower.so.0 (0x00007f1f7ede0000)
        libquadmath.so.0 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib/gcc/x86_64-pc-linux-gnu/14/libquadmath.so.0 (0x00007f1f7e313000)
        libgcc_s.so.1 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib/gcc/x86_64-pc-linux-gnu/14/libgcc_s.so.1 (0x00007f1f7e91c000)
        libtinfow.so.6 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libtinfow.so.6 (0x00007f1f7dd9e000)
        libicudata.so.73 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib64/libicudata.so.73 (0x00007f1f7be00000)
        libstdc++.so.6 => /cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/lib/gcc/x86_64-pc-linux-gnu/14/libstdc++.so.6 (0x00007f1f7ba00000)

Thank you,
Jean-Noel

1 Like

Yes, I think the problem is that Positron does not know how to load the module. Can you try adding something like this to your settings.json?

    "positron.environmentModules.environments": {
        "env-name-here": {
            "languages": ["r"],
            "modules": ["r/2.32"]
        }   
    }

Replace env-name-here with whatever you like (it will be the name of the module environment), and r/2.32 with whatever argument you provide to module load (e.g. if you load R with module load r/2.32).

Quit and restart Positron, and Positron should now detect your modularized R version.

If that doesn't work, could you share the contents of the "R Language Pack" and "Environment Modules" output channels?