Apparent incompatibility of new RStudio version with Ubuntu 20.04

I have just downloaded the new version of RStudio 1.4.1717 for the Ubuntu 18 OS. Note that there is not a version listed for Ubuntu 20.04 LTS version. When I tried to install it, I was told that installation was not possible because a dependency was lacking (though the installer didn't specify what the lacking dependency was). It would appear that something present in Ubuntu 18 is not present any longer in Ubuntu 20.04 LTS.

Is there now, or will there be, a version of RStudio 1.4.1717 for the Ubuntu 20.04 LTS that will install properly? Or if this is not the problem, how can I fix this problem?
Thanks in advance for the help.
Larry Hunsicker

1 Like

I use RStudio 1.4.1717 in Ubuntu 20.04 LTS without any issues using the installer you have mentioned, so I suspect your issue is system specific. Can you share the actual console output or any other information that might help diagnose the problem?

Just to echo @andresrcs I am using R version 4.1.0 with RStudio Version 1.4.1714 on Ubuntu 20.04 with no problem.

Try using gdebi to install RStudio using the .deb file. It's like Dpkg, plus automatic dependency installation like Apt. It should either automatically download and install dependencies, or it should tell you which one is unavailable or causes a conflict.

sudo apt install gdebi-core
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb
sudo gdebi rstudio-1.4.1717-amd64.deb

This is for the latest RStudio Desktop version. If you're trying to install RStudio Server, you can find that info here.

This doesn't quite work, but it certainly points to the problem. See the following efforts. The problem seems to be due to libclang-dev or some of its pieces. How do I fix this? Should I remove libclang-dev and reinstall it? I don't want to break things worse trying to fix it.

rry@larry-VirtualBox:~/Downloads$ sudo gdebi rstudio-1.4.1717-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Cannot install 'libclang-dev'
larry@larry-VirtualBox:~/Downloads$ sudo apt install libclang-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libclang-dev : Depends: libclang-10-dev (>= 10~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
larry@larry-VirtualBox:~/Downloads$ sudo apt install libclang-10-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libclang-10-dev : Depends: libclang-common-10-dev (= 1:10.0.0-4ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
larry@larry-VirtualBox:~/Downloads$ sudo apt install libclang-common-10-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libclang-common-10-dev : Depends: lib32gcc-s1 (>= 4.2) but it is not going to be installed
Depends: lib32stdc++6 (>= 4.1.1) but it is not going to be installed
Depends: libc6-i386 (>= 2.17) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

1 Like

You're on the right track! I've seen issues with libc6-i386 and related libraries after an upgrade to Ubuntu 20.04. Try the same thing again, run apt install for lib32gcc-s1, lib32stdc++6, and libc6-i386, and see which gives you the most problems. Just don't actually follow through on an install if it says it will remove a bunch of packages. You may need to go down that road to fix it, but you've gotta make the right plan first.

You're in a minor form of dependency hell, but there should be a way out!

They're all broken. See below. I suspect that I need to delete a bunch of things and reinstall them. But as I said, I don't want to make things worse than they are. These all seem to be library files for the c and c++ compilers. Is it safe to delete them (and reload them) so long as I am not doing any compiling meanwhile?

larry@larry-VirtualBox:~/Downloads$ sudo apt install lib32gcc-s1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
lib32gcc-s1 : Depends: libc6-i386 (>= 2.2.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
larry@larry-VirtualBox:~/Downloads$ sudo apt install lib32stdc++6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
lib32stdc++6 : Depends: lib32gcc-s1 (>= 10.2.0-5ubuntu1~20.04) but it is not going to be installed
Depends: libc6-i386 (>= 2.18) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
larry@larry-VirtualBox:~/Downloads$ sudo apt install libc6-i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libc6-i386 : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.3 is to be installed
E: Unable to correct problems, you have held broken packages.
larry@larry-VirtualBox:~/Downloads$ ^C

1 Like

Yep, this is the exact same thing I ran into recently. At some point, libc6 version 2.31-0ubuntu9.3 was added to Ubuntu's repositories, but a lot of packages seem to want 2.31-0ubuntu9.2 specifically, and new versions of those packages weren't released to match up with the new 9.3 one, so it broke quite a few things. This is gonna be a bit uncomfortable, but here's what did before, and what I would try if I were you:

  1. Try running sudo apt install libc6=2.31-0ubuntu9.2. Chances are, it's gonna tell you a bunch of packages will be removed in order to roll back. I don't think there's a way around it: You'll have to go through with it. Just copy/paste the list of packages that are gonna be uninstalled, and you can go back through and install them again once this is all done. They'll all work fine with the older version of libc6, since it's actually the right one, but there's no easy way to tell it to roll back to that version without changing anything else, since there are a bunch of dependencies mixed in that got caught up in everything.

  2. Once libc6=2.31-0ubuntu9.2 has been installed, run sudo gdebi rstudio-1.4.1717-amd64.deb (or whatever the file name is for you) right away to get RStudio installed. It shouldn't run into any problems anymore.

  3. This step might be optional, but it could help to run sudo apt autoremove to remove old packages that might have tried to use the 9.3 version of libc6, so you don't run into more issues as you re-add software that was removed. Maybe run sudo apt clean and sudo apt update for good measure too.

  4. Start installing back packages that were removed when you downgraded libc6. You should find you have no trouble reinstalling them. You probably don't need to install every single one: Just pick the main software you need from that list, and they'll probably add all the dependencies back on their own. If there are any libraries or other packages you might need and you're unsure, you could try to add back every single one to be safe. It could take a while, but it is what it is.

Hopefully everything adds back without a hitch. I wish there was an easier way. You can do it!

3 Likes

Rather amazing! It worked without a hitch! I'm not sure that I understood exactly what the problem was, or how I fixed it. But it worked!
Many, many thanks.
Larry

Glad I could help! The key is that for most of the dependency issues you ran into, apt kept saying that the package "is not going to be installed," which isn't super helpful. But when you got to libc6-i386, it said:

libc6-i386 : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.3 is to be installed

If you had checked on libc6, you'd see that version 9.3 was installed, but 9.2 is the one that the dependency tree required. So in order for things to proceed, you had to specifically tell apt to roll back to 9.2, and let it remove a bunch of packages in the process. Once you got libc6 on the right version, all the other packages that were "not going to be installed" before, no longer had any dependency issues they were hanging on. Libc6 was the problem.

Last thing: Make sure to mark "Solution" on my reply that includes the instructions that fixed it for you. Thanks again!

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