Cannot install RStudio with Ubuntu 20.04

I have recently installed Ubuntu 20.04, however I cannot seem to install Rstudio. It seems some other people have had the same problem however, none of the solutions I've seen so far work for me.

I have tried to install Rstudio using

sudo gdebi rstudio-1.4.1717-amd64.deb

which returns this error:

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
This package is uninstallable
Cannot install 'libclang-dev'

I have tried many methods to get around this, including trying to install an older version of libc6, and installing an older version of rstudio - all of which are solutions that seemed to work for others on the internet.

I am new to Ubuntu and am out of ideas how to install RStudio. Could anyone help?

Welcome to the forum.
I think you need to install libclang-dev

Have you tried

sudo apt intstall libclang-dev

and then installing RStudio?

Welcome to Ubuntu :slight_smile:

Hi, thank you for your response!

I have already tried installing libclang-dev, which returns:

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.

I have also tried installing clang, which has similar issues :thinking:

I have been using Ubuntu for years but I am not anything other than a simple-minded user.

I do see that I have some mad number of libclang_xxx files in user/share and usr/lib but I don't remember if I manually installed them. However I am using Ubuntu 25.04
Perhaps

https://zoomadmin.com/HowToInstall/UbuntuPackage/libclang-dev

or you might be able to download
libclang-dev_10.0-50~exp1_amd64.deb

found mentioned here
https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/libclang-dev_10.0-50~exp1_amd64.deb.html

and install it?

Otherwise could you upgrade to Ubuntu 25.04?

Sorry to be so little help.

I have managed to install libclang-dev and that has worked! Thank you so much :blush:

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.