Ubuntu 14.04,Clang 3.8:由于缺少 libllvm3.8v4 而无法更新

Ubuntu 14.04,Clang 3.8:由于缺少 libllvm3.8v4 而无法更新

我无法再在 Ubuntu 14.04 机器上更新 Clang 3.8。当我运行apt-get upgrade(或dist-upgrade) 时,数据包管理器失败并显示以下错误。

david@window:~$ sudo apt-get dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 clang-3.8 : Depends: libllvm3.8v4 but it is not installed
 clang-format-3.8 : Depends: libllvm3.8v4 but it is not installed
 libclang-common-3.8-dev : Depends: libllvm3.8v4 (= 1:3.8-2ubuntu3~trusty4) but it is not installed
 libclang1-3.8 : Depends: libllvm3.8v4 but it is not installed
 liblldb-3.8 : Depends: libllvm3.8v4 (= 1:3.8-2ubuntu3~trusty4) but it is not installed
 lldb-3.8 : Depends: libllvm3.8v4 (= 1:3.8-2ubuntu3~trusty4) but it is not installed
 llvm-3.8 : Depends: libllvm3.8v4 but it is not installed
 llvm-3.8-dev : Depends: libllvm3.8v4 (= 1:3.8-2ubuntu3~trusty4) but it is not installed
 llvm-3.8-runtime : Depends: libllvm3.8v4 but it is not installed
E: Unmet dependencies. Try using -f.

奔跑-f在这里停止。

david@window:~$ sudo apt-get dist-upgrade -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  libllvm3.8v4
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
9 not fully installed or removed.
Need to get 9721 kB of archives.
After this operation, 40,4 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://si.archive.ubuntu.com/ubuntu/ trusty-updates/main libllvm3.8v4 amd64 1:3.8-2ubuntu3~trusty4 [9721 kB]
Fetched 9721 kB in 0s (19,8 MB/s)    
(Reading database ... 427368 files and directories currently installed.)
Preparing to unpack .../libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_amd64.deb ...
Unpacking libllvm3.8v4:amd64 (1:3.8-2ubuntu3~trusty4) ...
dpkg: error processing archive /var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1', which is also in package libllvm3.8:amd64 1:3.8~svn271772-1~exp1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

问题似乎出在libllvm3.8v4包裹上。根据这个,它最近已从主存储库中删除。

所以我想我应该删除 clang 3.8 并安装其他版本。但问题是:我的数据包管理器现在卡住了。我无法删除或安装任何软件包——包括和llvmclang有什么想法吗?

更多信息

david@window:~$ uname -a
Linux window 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
david@window:~$ dpkg -l | grep -i 'llvm\|clang'
iU  clang-3.8                                             1:3.8-2ubuntu3~trusty4                              amd64        C, C++ and Objective-C compiler (LLVM based)
iU  clang-format-3.8                                      1:3.8-2ubuntu3~trusty4                              amd64        Tool to format C/C++/Obj-C code
iU  libclang-common-3.8-dev                               1:3.8-2ubuntu3~trusty4                              amd64        clang library - Common development package
rc  libclang1-3.4:amd64                                   1:3.4-1ubuntu3                                      amd64        C interface to the clang library
rc  libclang1-3.5:amd64                                   1:3.5-4ubuntu2~trusty2                              amd64        C interface to the clang library
iU  libclang1-3.8:amd64                                   1:3.8-2ubuntu3~trusty4                              amd64        C interface to the clang library
ii  libllvm3.4:amd64                                      1:3.4-1ubuntu3                                      amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm3.4:i386                                       1:3.4-1ubuntu3                                      i386         Modular compiler and toolchain technologies, runtime library
rc  libllvm3.5:amd64                                      1:3.5-4ubuntu2~trusty2                              amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm3.8:amd64                                      1:3.8~svn271772-1~exp1                              amd64        Modular compiler and toolchain technologies, runtime library
iU  llvm-3.8                                              1:3.8-2ubuntu3~trusty4                              amd64        Modular compiler and toolchain technologies
iU  llvm-3.8-dev                                          1:3.8-2ubuntu3~trusty4                              amd64        Modular compiler and toolchain technologies, libraries and headers
iU  llvm-3.8-runtime                                      1:3.8-2ubuntu3~trusty4                              amd64        Modular compiler and toolchain technologies, IR interpreter

另外,我正在使用来自 apt.llvm.org 的 PPA

david@window:~$ tail /etc/apt/sources.list
# Clang 3.8
deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main

答案1

我也遇到了这个问题。

我能够用以下方法修复它:

    sudo dpkg -i --force-overwrite /var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_amd64.deb

然后:

    sudo apt-get install -f

在这里找到答案: http://forum.ubuntu-it.org/viewtopic.php?p=4901154

相关内容