1

I tried removing /var/cache/apt/archives/libc6-dev-i386_2.23-0ubuntu5_amd64.deb.

I also tried sudo apt-get update and sudo apt-get autoclean, but it doesn't fix the issue.

sudo apt-get install -f

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  ubuntu-core-launcher
Use 'sudo apt autoremove' to remove it.
The following additional 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 15 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1,262 kB of archives.
After this operation, 6,936 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 278396 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.23-0ubuntu5_amd64.deb ...
Unpacking libc6-dev-i386 (2.23-0ubuntu5) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.23-0ubuntu5_amd64.deb (--unpack):
 trying to overwrite '/usr/include/fpu_control.h', which is also in package libc6-dev-amd64:i386 2.23-0ubuntu5
Errors were encountered while processing:
 /var/cache/apt/archives/libc6-dev-i386_2.23-0ubuntu5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT: Output of apt-cache --installed rdepends libc6-dev-i386 libc6-dev-amd64

apt-cache --installed rdepends libc6-dev-i386 libc6-dev-amd64
libc6-dev-i386
Reverse Depends:
  libc6-dev-x32
  libc6-i386
  libc6-dev-x32
  gcc-5-multilib
  libc6-i386
  gcc-5-multilib
libc6-dev-amd64:i386
Reverse Depends:

Output of grep ^[^#] /etc/apt/sources.list /etc/apt/sources.list.d/*

grep ^[^#] /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://in.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://in.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://in.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://in.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
/etc/apt/sources.list.d/damien-moore-ubuntu-codeblocks-stable-xenial.list:deb http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial main
/etc/apt/sources.list.d/damien-moore-ubuntu-codeblocks-stable-xenial.list.save:deb http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/google-chrome.list.save:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/snwh-ubuntu-pulp-xenial.list:deb http://ppa.launchpad.net/snwh/pulp/ubuntu xenial main
/etc/apt/sources.list.d/snwh-ubuntu-pulp-xenial.list.save:deb http://ppa.launchpad.net/snwh/pulp/ubuntu xenial main
/etc/apt/sources.list.d/steam.list:deb [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam
/etc/apt/sources.list.d/steam.list:deb-src [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam
/etc/apt/sources.list.d/steam.list.save:deb [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam
/etc/apt/sources.list.d/steam.list.save:deb-src [arch=amd64,i386] http://repo.steampowered.com/steam/ precise steam
/etc/apt/sources.list.d/thefanclub-ubuntu-grive-tools-xenial.list.save:deb http://ppa.launchpad.net/thefanclub/grive-tools/ubuntu xenial main
/etc/apt/sources.list.d/wine-ubuntu-wine-builds-xenial.list:deb http://ppa.launchpad.net/wine/wine-builds/ubuntu xenial main
/etc/apt/sources.list.d/wine-ubuntu-wine-builds-xenial.list.save:deb http://ppa.launchpad.net/wine/wine-builds/ubuntu xenial main
  • @anx: Overwriting files of other packages is not a general solution to this kind of problem. Please don't recommend it without considering the underlying problem, i. e. a packaging conflict, first. – David Foerster Jan 08 '17 at 09:52

4 Answers4

5

Why are you trying to install both libc6-dev-i386 and libc6-dev-amd64? If you want to cross-compile and your system architecture

  • is amd64 you need libc6-dev and lib6-dev-i386 (it looks like that's the case for you), or
  • is i386 you need libc6-dev and libc6-dev-amd64.

So, remove lib6-dev-i386:

sudo apt-get purge -f lib6-dev-amd64:i386

That command will tell Apt to fix package conflicts using a solution involving the removal of lib6-dev-amd64:i386. If that doesn't work you can manually remove the package and fix remaining conflicts:

sudo dpkg --purge lib6-dev-amd64:i386
sudo apt-get install -f
David Foerster
  • 36,264
  • 56
  • 94
  • 147
0

I had a similar problem and I found a help that answer try this:

sudo aptitude install libc6-dev:i386

and then answer Yes twice.

obs. write exact this "libc6-dev:i386', this is the correct one.

0

I tried removing every dependencies which is dependent on each other and apt-get is working now.

Here is my solution,

sudo apt remove libc6-dev-x32  libc6-dev-i386 gcc-5-multilib gcc-multilib
-1

Try remove packet on /var/cache/apt/archives/libc6-dev-i386_2.23-0ubuntu5_amd64.deb

rm -rf /var/cache/apt/archives/libc6-dev-i386_2.23-0ubuntu5_amd64.deb

Try clean packet and install fail

sudo apt-get autoclean
sudo apt-get autoremove 

And final try reinstall your packet. Good luck!!

David Foerster
  • 36,264
  • 56
  • 94
  • 147