Rstudio 2023.06.0 chooses wrong R version

We recently installed the newest rstudio 2023.06.0 on an ubuntu 22.04 workstation. We tend to use conda to manage our R versions that we want to use. With the previous 2022 version that we ran previously we have never had an issue but since this upgrade we have trouble getting rstudio to launch the correct R version.

We now have a system that has an r-base-core 4.3 installed via apt as well as an R 4.2.2 in a conda environment. The conda environment was simply created with conda install r-base=4.2.2

Now when we start rstudio without the conda environment being activated, rstudio starts with a few warnings about ...
When we activate the conda environment where 'which R' as well as 'RSTUDIO_WHICH_R' are set correctly, rstudio returns an error message in the R console as it tries to start R 4.3 which looks like this:

R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
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.

WARNING: R shared object (/data/user/pantczak/my-envs/R4.2.2/lib/R/lib/libR.so) failed load test with error: 
Linux may have loaded a different libR.so than requested. This can result in "package was built under R version X.Y.Z" user warnings and R_HOME/R version mismatches.
R_HOME: /data/user/pantczak/my-envs/R4.2.2/lib/R
R Version: 4.3.0. Please contact your system administrator to correct this libR.so install.

When I start rstudio with DEBUG logs enabled it looks like it picks the right R and sets all the necessary variables yet still it starts with the wrong R version...

2023-06-12T12:31:46.651Z DEBUG Ready to run
2023-06-12T12:31:46.721Z DEBUG instance lock: true, project: , file: false
2023-06-12T12:31:46.722Z DEBUG net-ipc: creating new message server; socket=/data/user/pantczak/.local/share/rstudio/rstudio.socket
2023-06-12T12:31:46.724Z DEBUG No rPath found, scanning for R
2023-06-12T12:31:46.724Z DEBUG Using /data/user/pantczak/my-envs/R4.2.2/bin/R (found by RSTUDIO_WHICH_R environment variable)
2023-06-12T12:31:46.724Z DEBUG Done choosing R
2023-06-12T12:31:46.724Z DEBUG Preparing environment using R: /data/user/pantczak/my-envs/R4.2.2/bin/R
2023-06-12T12:31:46.724Z DEBUG Querying information about R executable at path: /data/user/pantczak/my-envs/R4.2.2/bin/R
2023-06-12T12:31:46.892Z DEBUG stdout:
4.2.2;/data/user/pantczak/my-envs/R4.2.2/lib/R;/data/user/pantczak/my-envs/R4.2.2/lib/R/doc;/data/user/pantczak/my-envs/R4.2.2/lib/R/include;/data/user/pan>
2023-06-12T12:31:46.893Z DEBUG stderr: [no stderr produced]
2023-06-12T12:31:46.893Z DEBUG status: 0 [success]
2023-06-12T12:31:46.895Z DEBUG Launching rsession: /usr/lib/rstudio/resources/app/bin/rsession --config-file none --program-mode desktop --www-port 46691 ->
2023-06-12T12:31:46.895Z DEBUG R_HOME: /data/user/pantczak/my-envs/R4.2.2/lib/R
2023-06-12T12:31:46.895Z DEBUG RS_INITIAL_PROJECT:
2023-06-12T12:31:46.895Z DEBUG RS_LOG_LEVEL:
2023-06-12T12:31:46.964Z DEBUG Setting base URL: http://127.0.0.1:46691
2023-06-12T12:31:46.966Z DEBUG 'frame-created': [<event>, <object>]
2023-06-12T12:31:46.966Z DEBUG 'did-start-loading': [<event>]
2023-06-12T12:31:46.966Z DEBUG 'did-start-navigation': [<event>, "http://127.0.0.1:46691/", false, true, 4, 1]
2023-06-12T12:31:46.967Z DEBUG net-ipc: 11103 taking over as primary instance

We noticed that the rsession launch somehow has no config-file added - is there supposed to be one when starting a different version?

Any help would be greatly appreciated.

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: 2023.06.0
  • OS Version: Ubuntu 22.04.2 LTS
  • R Version: 4.3 and 4.2.2 (conda)

It seems that to make this work on ubuntu I have to use the 2022.04 version which correctly uses the R which is active in the enviornment rstudio is started in - but then using R 4.3 is problematic because the graphics engine does not match...

This topic was automatically closed 21 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.