RStudio not recognizing my R version/R session fatal error

Hi all,

I've been trying to get RStudio and R to work on a computer I installed Linux Mint on a couple months back. R seems to work, but every time I install RStudio and try to boot it up, I get this error that the R session had a fatal error. From looking at other forum posts on here and the linux mint site, it seems like it might have to do with the distro I'm running being based on Ubuntu noble rather than Ubuntu jammy, but I really have no idea. I've used R and RStudio on windows to some degree, so I have some familiarity, but this installation is just not working for me. At the moment, my R version is 4.5.0 and I'm running on Linux Mint 22.2 Cinnamon, which seems to be based on Ubuntu 24.04 noble. The error message I get is attached below. Any help is greatly appreciated.

R Session Startup Failure Report

RStudio Version

RStudio 2025.09.2+418 "Cucumberleaf Sunflower " (12f6d5e2, 2025-10-20) for Ubuntu Jammy

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2025.09.2+418 Chrome/138.0.7204.251 Electron/37.6.1 Safari/537.36

Error message

The R session had a fatal error.

This error was very likely caused by R attempting to load packages from a different incompatible version of R on your system. Please remove other versions of R and/or remove environment variables that reference libraries from other versions of R before proceeding.

2025-11-23T07:39:53.103012Z [rsession-ottoweigel] ERROR r error 4 (Error : .onLoad failed in loadNamespace() for 'utils', details:||| call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)||| error: 4 arguments passed to .Internal(system) which requires 3|||) [errormsg: Error : .onLoad failed in loadNamespace() for 'utils', details:||| call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)||| error: 4 arguments passed to .Internal(system) which requires 3|||]; OCCURRED AT rstudio::core::Error rstudio::r::exec::evaluateString(const string&, SEXP, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::EvalFlags) src/cpp/r/RExec.cpp:392

2025-11-23T07:39:53.103012Z [rsession-ottoweigel] ERROR r error 4 (Error : .onLoad failed in loadNamespace() for 'utils', details:||| call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)||| error: 4 arguments passed to .Internal(system) which requires 3|||) [errormsg: Error : .onLoad failed in loadNamespace() for 'utils', details:||| call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)||| error: 4 arguments passed to .Internal(system) which requires 3|||]; OCCURRED AT rstudio::core::Error rstudio::r::exec::evaluateString(const string&, SEXP, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::EvalFlags) src/cpp/r/RExec.cpp:392

Process Output

The R session exited with code 2.

Error output:

2025-11-23T07:39:53.103012Z [rsession-ottoweigel] ERROR r error 4 (Error : .onLoad failed in loadNamespace() for 'utils', details:|||  call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)|||  error: 4 arguments passed to .Internal(system) which requires 3|||) [errormsg: Error : .onLoad failed in loadNamespace() for 'utils', details:|||  call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)|||  error: 4 arguments passed to .Internal(system) which requires 3|||]; OCCURRED AT rstudio::core::Error rstudio::r::exec::evaluateString(const string&, SEXP, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::EvalFlags) src/cpp/r/RExec.cpp:392


Standard output:

[No output emitted]

Logs

/home/ottoweigel/.local/share/rstudio/log/rsession-ottoweigel.log

]; OCCURRED AT rstudio::core::Error rstudio::r::exec::evaluateString(const string&, SEXP, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::EvalFlags) src/cpp/r/RExec.cpp:392; LOGGED FROM: int rstudio::r::session::RReadConsole(const char*, CONSOLE_BUFFER_CHAR*, int, int) src/cpp/r/session/RStdCallbacks.cpp:296
2025-11-23T07:39:53.103249Z [rsession-ottoweigel] ERROR R SUICIDE: 2025-11-23T07:39:53.103012Z [rsession-ottoweigel] ERROR r error 4 (Error : .onLoad failed in loadNamespace() for 'utils', details:|||  call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)|||  error: 4 arguments passed to .Internal(system) which requires 3|||) [errormsg: Error : .onLoad failed in loadNamespace() for 'utils', details:|||  call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)|||  error: 4 arguments passed to .Internal(system) which requires 3|||]; OCCURRED AT rstudio::core::Error rstudio::r::exec::evaluateString(const string&, SEXP, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::EvalFlags) src/cpp/r/RExec.cpp:392; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1390
2025-11-23T07:39:53.103249Z [rsession-ottoweigel] ERROR R SUICIDE: 2025-11-23T07:39:53.103012Z [rsession-ottoweigel] ERROR r error 4 (Error : .onLoad failed in loadNamespace() for 'utils', details:|||  call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)|||  error: 4 arguments passed to .Internal(system) which requires 3|||) [errormsg: Error : .onLoad failed in loadNamespace() for 'utils', details:|||  call: system(paste(which, shQuote(names[i])), intern = TRUE, ignore.stderr = TRUE)|||  error: 4 arguments passed to .Internal(system) which requires 3|||]; OCCURRED AT rstudio::core::Error rstudio::r::exec::evaluateString(const string&, SEXP, SEXPREC**, rstudio::r::sexp::Protect*, rstudio::r::exec::EvalFlags) src/cpp/r/RExec.cpp:392; LOGGED FROM: void {anonymous}::rSuicide(const string&) src/cpp/session/SessionMain.cpp:1390

I'm guessing here but in looks like there is something wrong with the {utils} package.

What about trying to upgrade *R to most recent version 4.5.2? If the problem is a corrupt {utils} package this might cure it.

1 Like

For what it's worth, I'm running the same version of RStudio on Mint 22.2 (MATE) with no problems, together with R 4.5.2. Did you have a previous version of RStudio running on this machine, or is this your first time installing RStudio? If you had a previous version, you might try resetting RStudio's state.

I have uninstalled and reinstalled R and RStudio several times in the process of trying to get it to work, but it was not working during any of the installations. I just fully wiped my system of any instance of R and reinstalled R through sudo apt install r-recommended, and RStudio works now with R 4.3.3, so it looks like I might've had conflicting versions that were messing it up. I guess I hadn't fully uninstalled R when I was doing it before.

Hi all,

Thanks for the help! I ended up fully wiping my system of any instance of R and reinstalling R through sudo apt install r-recommended, and RStudio works now with R 4.3.3, so it looks like I might've had conflicting versions that were messing it up. I guess I hadn't fully uninstalled R when I was doing it before.