Rstudio installation error on Ubuntu 20.04: Dependency is not satisfiable: libclang-dev

I made the mistake of trying to upgrade Rstudio and now I cannot install the new version and the old version was removed. Reinstalling the old one doesn't work either. :man_facepalming:

I downloaded this: rstudio-2022.07.2-576-amd64.deb

gdebi rstudio-2022.07.2-576-amd64.deb

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libclang-dev

But, if I search for installed packages, I get this

sudo apt list --installed | grep "libclang" 

libclang-11-dev/focal-updates,focal-updates,now 1:11.0.0-2~ubuntu20.04.1 amd64 [installed]
libclang-12-dev/focal-security,focal-updates,now 1:12.0.0-3ubuntu1~20.04.5 amd64 [installed]
libclang-common-11-dev/focal-updates,focal-updates,now 1:11.0.0-2~ubuntu20.04.1 amd64 [installed,automatic]
libclang-common-12-dev/focal-security,focal-updates,now 1:12.0.0-3ubuntu1~20.04.5 amd64 [installed,automatic]
libclang1-11/focal-updates,focal-updates,now 1:11.0.0-2~ubuntu20.04.1 amd64 [installed,automatic]
libclang1-12/focal-security,focal-updates,now 1:12.0.0-3ubuntu1~20.04.5 amd64 [installed,automatic]

If I try to install it, I get this:

sudo apt-get install libclang-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libclang-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libclang-dev' has no installation candidate

Tried this:

sudo aptitude install clang

No candidate version found for clang     
Unable to apply some actions, aborting

Tried all the suggestions here: package management - Unable to install libclang on 20.04 LTS - Ask Ubuntu

I have tried to install RStudio through conda which also fails:

mamba install -c r rstudio

Encountered problems while solving:
  - package tensorboard-data-server-0.6.0-py39h95dcef6_1 requires openssl >=1.1.1l,<1.1.2a, but none of the providers can be installed

conda list | grep openssl           
                             
openssl                   1.1.1s               h7f8727e_0  
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
r-openssl                 1.4.4             r41he36bf35_0    conda-forge

You might be downloading the wrong installer, just to be sure, are you using this link?

https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.07.2-576-amd64.deb

I think I have the right link: I am trying with this:

https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.07.2-576-amd64.deb

I also tried an older version. It had a desktop and desktop-electron versions

https://s3.amazonaws.com/rstudio-ide-build/desktop/bionic/amd64/rstudio-2022.07.1-554-amd64.deb
https://s3.amazonaws.com/rstudio-ide-build/electron/bionic/amd64/rstudio-2022.07.1-554-amd64.deb

May be it is too obvious: I wonder if you tried to run apt-get update before you attempted the installation ? Maybe you simply need to refresh the package metadata cache.

In my Ubuntu 20.04 (Focal) container the installation works like a charm and findslibclang-dev successfully.

I upgraded to Ubuntu 22.04. (It was probably not necessary). Then added the following to
/etc/apt/sources.list.

deb http://se.archive.ubuntu.com/ubuntu/ jammy main restricted universe
deb http://se.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe

Then I was able to install libclang-dev.

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.