4

I am no longer able to update Clang 3.8 on my Ubuntu 14.04 machine. When I run apt-get upgrade (or dist-upgrade), the packet manager fails with the following error.

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.

Running with -f stops here.

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)

The problem seems to be the libllvm3.8v4 package. According to this, it has been recently removed from the main repository.

So I thought I'd just remove clang 3.8 it and install some other version. But here's the deal: my packet manager is now stuck. I am unable to remove or install any package -- including the llvm and clang ones. Any ideas?

Some more info

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

Also, I'm using the PPA from the apt.llvm.org:

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
David
  • 43
  • 1
  • 5

1 Answers1

8

I also experienced this problem.

I was able to fix it with:

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

then:

    sudo apt-get install -f

Found the answer here: http://forum.ubuntu-it.org/viewtopic.php?p=4901154

creardon
  • 96
  • 2
  • Worked for me as well. Thank you for taking the time to find the fix and update us with the answer! – Jake Aug 22 '16 at 04:55
  • Thank you! solved the problem! Apparently there was tons of users with the same problem! – Bryksin Aug 24 '16 at 11:02