RStudio doesn't work on Debian 12 with R version 4.3.2

Hello,

From the download website, it seems RStudio support Debian 12. I have installed R 4.3.2

R version 4.3.2 (2023-10-31) -- "Eye Holes"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

But Rstudio shows

There is

## R Session Startup Failure Report

### RStudio Version

RStudio 2023.09.1+494 "Desert Sunflower " (cd7011dc, 2023-10-16) for Ubuntu Jammy

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.09.1+494 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36

### Error message

[No error available]

### Process Output

The R session exited with code 127. 

Error output:

/usr/lib/rstudio/resources/app/bin/rsession: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory


Standard output:

[No output emitted]


### Logs

*/home/zhenyu/.local/share/rstudio/log/rsession-zhenyu.log*

2023-11-29T03:03:37.419776Z [rsession-zhenyu] ERROR R SUICIDE: unable to initialize the JIT; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1245
2023-11-29T03:03:37.419776Z [rsession-zhenyu] ERROR R SUICIDE: unable to initialize the JIT; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1245               

Does R start from the terminal?

On Mint (and presumably Ubuntu -- not sure about Debian) there should be a symlink /usr/lib/libR.so pointing to /usr/lib/R/lib/libR.so. Do you have both of those, and do they both have read permissions for non-root users?

No. I just started the RStudio. But R can be started from the terminal.

 ls /usr/lib | grep libR.so

returns nothing.

sudo ls /usr/lib/R/lib | grep libR.so

produces

ls: cannot access '/usr/lib/R/lib': No such file or directory

Do you have the r-base-core package installed? It provides the libR.so file.

rc r-base-core 4.2.2.20221110-2 amd64 GNU R core of statistical computation and graphics system
Yes. I have installed it.

But I still run this sudo apt install r-base-core and it installed 120+M in my computer. Now, when run RStudio, it shows

2023-12-04T04:39:16.050738Z [rsession-zhenyu] ERROR R SUICIDE: unable to initialize the JIT; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1245
2023-12-04T04:40:39.438624Z [rsession-zhenyu] ERROR R SUICIDE: unable to initialize the JIT; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1245
2023-12-04T04:40:39.438624Z [rsession-zhenyu] ERROR R SUICIDE: unable to initialize the JIT; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1245

ls /usr/lib | grep libR.so 
sudo ls /usr/lib/R/lib | grep libR.so

all returns libR.so.

There are multiple messages in the community about that error message, but the ones I found all seem to involve RStudio Server rather than the RStudio IDE.

If you are using RStudio Desktop rather than RStudio Server, you might try resetting its state as described here: https://support.posit.co/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State.

How can I completely remove RStudio Server? I have tried. But the error is the same.

I don't use RStudio Server (and I'm on Mint, not Debian), so I'm guessing here. If you have (had) RStudio Server installed and you use apt, you could try sudo apt purge <package> where is the package name you would use if you were installing it with apt get. Other than that, the best I can suggest is to try running RStudio from a terminal with rstudio --run-diagnostics. It will write some progress reports and possibly error messages in the terminal, and also will create a text file with a lot of information (and print the location of the text file in the terminal). Possibly something in the terminal output will be helpful. I get a number of error messages when I do this even though RStudio opens successfully, so you will need to wade through the output. Possibly it will print something more informative than the error message you have already gotten (but maybe not).

Thanks. rstudio --run-diagnostics

returns

[108945:1205/121505.768076:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[108945:1205/121505.770069:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization

Attempting to launch R session...
 . R_HOME = /usr/local/lib/R
 . R_DOC_DIR = /usr/local/lib/R/doc
 . R_INCLUDE_DIR = /usr/local/lib/R/include
 . R_SHARE_DIR = /usr/local/lib/R/share
 . LD_LIBRARY_PATH = /usr/local/lib/R/lib:/usr/local/lib:/usr/lib/jvm/jdk-21-oracle-x64/lib/server
 . PATH = /home/zhenyu/.local/bin:/usr/local/texlive/2023/bin/x86_64-linux:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
 . HOME = /home/zhenyu

R session launched, attempting to connect on port 36171...
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/home/zhenyu/.local/share/rstudio/log/rsession-zhenyu.log'.
unable to initialize the JIT

2023-12-05T04:15:05.986986Z [rsession-zhenyu] ERROR R SUICIDE: unable to initialize the JIT; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1245
2023-12-05T04:15:05.986986Z [rsession-zhenyu] ERROR R SUICIDE: unable to initialize the JIT; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1245

Connected to R session, attempting to initialize...

[109011:1205/121506.044033:ERROR:gl_factory.cc(120)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default),(gl=egl-gles2,angle=none)].
[109011:1205/121506.046541:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization

I get the same "GL" error messages at start and end. They seem to be harmless. The only thing I do not get is the JIT message. There are multiple posts here about the same error message, almost none of which contain a solution. You might take a look at RStudio error starting R - #5 by JohnHCarsonJr (different OS) which contains a solution involving reinstalling graphics drivers. Sorry I can't be more help.

Thanks. Installed 4.2.2 other than 4.3.2 can solve this problem.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.