1

I have just installed ubuntu 22.04. I could install R with sudo apt -y install r-base gdebi-core:

$ R

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

But when I try to install Rstudio from the downloaded file I get:

$ sudo gdebi rstudio-2022.02.1-461-amd64.deb 
[sudo] password for gigiux: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libssl1.0.0|libssl1.0.2|libssl1.1

It is weird that a popular deb file misses a basic library, plus:

$ sudo apt install libssl1.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libssl1.1
E: Couldn't find any package by glob 'libssl1.1'

What is the correct procedure to install R and R studio on Ubuntu 22.04?

2
  • apt is a deb package command and is used by 22.04, but not Ubuntu Core 22. 22 or year format products of Ubuntu are different systems to those using the year.month format. If you're using Ubuntu 22.04 please state it, and don't mix in different product/system details such as 22 (year format releases of Ubuntu have existed since 2016). Are you asking about Ubuntu Core 22? or Ubuntu 22.04 LTS as you use both.
    – guiverc
    Apr 24, 2022 at 11:14

4 Answers 4

2

RStudio is currently preparing a version that fixes the issue. You can download their daily deb, which is not a released version, but I tested it and it works well:

https://dailies.rstudio.com/rstudio/spotted-wakerobin/desktop/jammy/

Here is the RStudio post (by an RStudio employee) linking to the above URL:

https://community.rstudio.com/t/dependency-error-when-installing-rstudio-on-ubuntu-22-04-with-libssl/135397/4

I would expect all subsequent dailies to work well, but for completeness the exact daily that I tested on Ubuntu 22.04 that worked well is "rstudio-2022.06.0-daily-341-amd64.deb".

1
  • Seems like the situation has not changed in 2023 :/ Mar 18 at 6:33
2

I tried something that seems to have worked. I edited the desktop entry file for RStudio and added the --no-sandbox option flag to the Exec line. This automatically changed command executed when I click on the RStudio application icon, be it the desktop icon or the launcher icon in the favorites bar.

So, first go to the folder /usr/share/applications. There you will find a file named rstudio.desktop. Open this file with a text editor. The content probably will be something like this:

[Desktop Entry]
Exec=/usr/lib/rstudio/bin/rstudio %F
Icon=rstudio
Type=Application
Terminal=false
Name=RStudio
Categories=Development;IDE;
MimeType=text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-quarto-markdown;text/x-r-markdown;text/x-r-html;text/x-r-presentation;application/x-r-data;application/x-r-project;application/x-rdp-rsp;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/css;text/javascript;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;

Now, all you have to do is add the flag --no-sandbox to the Exec line, right before %F, like this:

[Desktop Entry]
Exec=/usr/lib/rstudio/bin/rstudio --no-sandbox %F
Icon=rstudio
Type=Application
Terminal=false
Name=RStudio
Categories=Development;IDE;
MimeType=text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-quarto-markdown;text/x-r-markdown;text/x-r-html;text/x-r-presentation;application/x-r-data;application/x-r-project;application/x-rdp-rsp;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/css;text/javascript;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;

How did it go?

2
  • I had the same problem with Atom. They did not release a new version as in R, so I solved the problem by changing the atom.desktop and you said and it worked. tx
    – Gigiux
    May 5, 2022 at 12:04
  • On another machine, I tried the solution. It works to launch Rstudio on its own, but if I click an R script, Rstudio is launched but the script is not loaded into the environment.
    – Gigiux
    May 8, 2022 at 7:13
1

I tried these codes after searching the internet and I found these codes working

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb
sudo gdebi ./libssl1.1_1.1.1l-1ubuntu1.2_amd64.deb
sudo gdebi rstudio-2022.02.1-461-amd64.deb

-accept 'y' for installing dependencies and trigger rstudio flagged with --no-sandbox

rstudio --no-sandbox

this successfully worked for me

3
  • Thank you. I launched normally with rstudio --no-sandbox. But if I launch directly from the icon, the Rstudio screen is blank. Do I need to use --no-sandbox each time? Is there a way to make this command permanent?
    – Gigiux
    Apr 26, 2022 at 14:21
  • I also have the same issue. Need to type rstudio --no-sandbox each time. Any solution?
    – Ari.stat
    Apr 27, 2022 at 23:56
  • some problem with atom IDE: it works only with --no-sandbox
    – Gigiux
    Apr 30, 2022 at 6:06
0

Looks like the above links may work in some instances, but we need to wait for further fixes and development of completely working RStudio by the RStudio team.

Link for the RStudio daily deb

Until then rstudio --no-sandbox is a better option to launch the application

@Thiago Albuquerque, adding --no-sandbox before "%F" in RStudio executor "Exec=/usr/lib/rstudio/bin/rstudio %F" is asking to check the save location due to permission issues, thus unable to save upon editing. If possible give a solution for this as this strategy can bypass every time manual execution through command line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.