2

I think I have a problem with mixing different repository packages, but I can't uninstall any of the conflicting packages. Any suggestions?

gunnar@gunnar-VirtualBox:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc6-dev-i386
The following NEW packages will be installed:
  libc6-dev-i386
0 upgraded, 1 newly installed, 0 to remove and 107 not upgraded.
4 not fully installed or removed.
Need to get 0 B/1,151 kB of archives.
After this operation, 6,337 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 247223 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.5) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb (--unpack):
trying to overwrite '/usr/include/gnu', which is also in package libc6-dev-amd64   2.19-0ubuntu6.5
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
1

3 Answers 3

3

I believe the observed behavior to be a manifestation of the following bug:

https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1365375

I provided a workaround in the above-cited bug report, in Comment #4:

https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1365375/comments/4

For your convenience, the text of that post is herein reproduced:

To follow-up on my previous comment, I was able to work around this "broken state" in aptitude by purging the offending packages with "--force-depends":

dpkg --purge --force-depends "gcc-multilib"
dpkg --purge --force-depends "lib32z1-dev"
dpkg --purge --force-depends "libc6-dev-x32"

Now, I'm able to use "apt-get" as normal.

Hopefully, this workaround won't cause problems in the future.

Unfortunately, the long-term solution is to await a proper fix from Canonical.

1
  • Thanks! Tried all sorts of other stuff with no luck. This fixed it for me so I can cross-compile on the new TravisCI Trusty workers
    – thehouse
    Commented Feb 28, 2016 at 15:49
0

Remove the file /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb and run sudo apt-get -f install again.

You have a 32 bit OS but have libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb file which is a 64 bit .deb file in your /var/cache/apt/archives/. So 32-bit Ubuntu is not being able to unpack it and giving the error. In a nutshell, run the following:

sudo rm /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb
sudo apt-get -f install
2
  • I removed the file as you suggested, but that didn't seem to solve the problem. The sudo apt-get -f install command seemed to reinstall it into the directory and I got the same error. 'After this operation, 6,337 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 us.archive.ubuntu.com/ubuntu trusty-updates/main libc6-dev-i386 amd64 2.19-0ubuntu6.5 [1,151 kB] ' Commented Jan 31, 2015 at 22:48
  • It looks like the amd64 is still getting reinstalled and causing the error? Commented Jan 31, 2015 at 22:55
0

As /usr/include/gnu is being overwritten by file from other package, remove that package will solve your problem.

Run following command to get rid of this situation.

sudo apt-get purge libc6-dev-i386
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get install -f
2
  • So I tried that and got the same error. I also tried 'sudo apt-get purge libc6-dev-amd64 libc6-dev-i386' because these two packages are causing the issue, but after the auto remove, clean and install, I still get the same error. dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb (--unpack): trying to overwrite '/usr/include/gnu', which is also in package libc6-dev-amd64 2.19-0ubuntu6.5 Errors were encountered while processing: /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb Commented Feb 1, 2015 at 21:39
  • can you post your complete output on paste.ubuntu.com and provide us a link.
    – g_p
    Commented Feb 2, 2015 at 4:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .