ubuntu - 无法安装 RStudio,无法安装 'libclang-dev'

标签 ubuntu libclang

我使用 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, 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]
.
.
.
在此之后,您可以使用 sudo gdebi [donwled deb file] 安装 rStudio。

关于ubuntu - 无法安装 RStudio,无法安装 'libclang-dev',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67383617/

相关文章:

wordpress - 在我的本地系统中配置 wordpress 时出现下面提到的错误

ubuntu - 错误 2003 (HY000) : Can't connect to MySQL server on '10.0.0.5' (111)

ubuntu - 如何在 Ubuntu 14.04 Trusty 上安装 2.4.3 版的 python-requests?

bash - 计算文本文件中的回文数

c++ - 如何使用 libclang 获取枚举元素的数值?

python - 获取 lib clang 游标/类型的实际拼写

libclang 的 C++ 绑定(bind)

ubuntu - 在 virtualbox 客户机上运行 64 位 Ubuntu

clang libtooling 安全地插入新 header

ios - 如何修复 "Xcode quit unexpectedly while using the libclang.dylib plug-in."?