无法安装 RStudio,无法安装“libclang-dev”

问题描述

我使用 ubuntu 20.04.2。我在使用 rStudio 时遇到了一些问题,因此我从计算机上完全卸载了。我已经安装了 r,但现在我想安装 rStudio,但是当我尝试安装时,我发现“libclang-dev”是可卸载的。

$ 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'

我已尝试安装 clang,但出现更多错误

$ 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.

谁能帮帮我? 谢谢!

解决方法

我设法解决了它。我运行sudo aptitude install clang。首先你需要对你得到的第一个提议说不(“n”),一个新的提议就会出现。如果您接受 ("y") 这第二个软件包,则会安装一些软件包:

<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,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]
.
.
.

在此之后,您可以使用 sudo gdebi [donwled deb file]

安装 rStudio