I use ubuntu 20.04.2. I had some problems with rStudio so I unistalled completelly from my computer. I already have installed r, but now I want to install rStudio but when I try to I get that 'libclang-dev' is uninstallable.
$ sudo gdebi rstudio-1.4.1106-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'
I have tried to install clang, but I get more errors:
$ sudo apt install clang
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:
clang : Depends: clang-10 (>= 10~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I manage to solve it. I run sudo aptitude install clang
. First yo need to say no ("n") to the first proposal you get, and a new one will appear. If you accept ("y") this second one some packages are installed:
<pre>The following NEW packages will be installed:
clang clang-10{a} lib32gcc-s1{a} lib32stdc++6{a} libc6-i386{ab} libclang-common-10-dev{a} libclang-cpp10{a} libclang1-10{a} libffi-dev{a} libllvm10{a} libncurses-dev{a} libobjc-9-dev{a} libobjc4{a}
libomp-10-dev{a} libomp5-10{a} libpfm4{a} libtinfo-dev{a} libz3-4{a} libz3-dev{a} llvm-10{a} llvm-10-dev{a} llvm-10-runtime{a} llvm-10-tools{a}
0 packages upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 81,1 MB of archives. After unpacking 488 MB will be used.
The following packages have unmet dependencies:
libc6-i386 : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.3 is installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) clang [Not Installed]
2) clang-10 [Not Installed]
3) lib32gcc-s1 [Not Installed]
4) lib32stdc++6 [Not Installed]
5) libc6-i386 [Not Installed]
6) libclang-common-10-dev [Not Installed]</pre>
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libc-dev-bin [2.31-0ubuntu9.3 (now) -> 2.31-0ubuntu9.2 (focal-updates)]
2) libc6 [2.31-0ubuntu9.3 (now) -> 2.31-0ubuntu9.2 (focal-updates)]
3) libc6-dbg [2.31-0ubuntu9.3 (now) -> 2.31-0ubuntu9.2 (focal-updates)]
4) libc6-dev [2.31-0ubuntu9.3 (now) -> 2.31-0ubuntu9.2 (focal-updates)]
Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
libc-dev-bin libc6 libc6-dbg libc6-dev
The following NEW packages will be installed:
clang clang-10{a} lib32gcc-s1{a} lib32stdc++6{a} libc6-i386{a} libclang-common-10-dev{a} libclang-cpp10{a} libclang1-10{a} libffi-dev{a} libllvm10{a} libncurses-dev{a} libobjc-9-dev{a} libobjc4{a}
libomp-10-dev{a} libomp5-10{a} libpfm4{a} libtinfo-dev{a} libz3-4{a} libz3-dev{a} llvm-10{a} llvm-10-dev{a} llvm-10-runtime{a} llvm-10-tools{a}
0 packages upgraded, 23 newly installed, 4 downgraded, 0 to remove and 0 not upgraded.
Need to get 96,9 MB of archives. After unpacking 488 MB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://es.archive.ubuntu.com/ubuntu focal-updates/main amd64 libc6-dev amd64 2.31-0ubuntu9.2 [2.520 kB]
Get: 2 http://es.archive.ubuntu.com/ubuntu focal-updates/main amd64 libc-dev-bin amd64 2.31-0ubuntu9.2 [71,8 kB]
Get: 3 http://es.archive.ubuntu.com/ubuntu focal-updates/main amd64 libc6-dbg amd64 2.31-0ubuntu9.2 [10,5 MB]
.
.
.
After this you can install rStudio using sudo gdebi [donwled deb file]
After reading some posts, I took a look of this one https://askubuntu.com/questions/1337617/unable-to-install-libclang-on-20-04-lts and applied the solution that said:
You have to revert libc6 library to the normal version using command below:
sudo apt-get install libc6=2.31-0ubuntu9.2 libc6:i386=2.31-0ubuntu9.2
After that, I launched the following to correct the broken installation:
sudo apt --fix-broken install
Having done that, I launched again the dpkg script and it worked for me:
sudo dpkg -i rstudio-2021.09.0-351-amd64.deb
Hope it can help to all of you that has this problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With