17

I have error in apt-get install it is a error:

The following packages have unmet dependencies:
 gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
 libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I try several command like: apt-get -f install apt-get clean

I try change my source list, and remake apt-get update

$ sudo apt-get install g++
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:
 gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
 libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

in apt-get -f install

$ 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 434 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1.148 kB of archives.
After this operation, 6.333 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 194963 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.6) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb (--unpack):
 trying to overwrite '/usr/include/bits', which is also in package libc6-dev-amd64 2.19-0ubuntu6.6
Errors were encountered while processing:
 /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
user3815068
  • 191
  • 1
  • 1
  • 10

10 Answers10

25

The same dpkg error is also possible when uninstalling:

apt-get uninstall

and

apt-get purge

First, uninstall the package:

rm -f /var/lib/dpkg/info/<package-name>*
apt-get purge <package-name>

Afterwards you can re-install it:

apt-get install <package-name>
Massimo
  • 3,171
  • 3
  • 28
  • 41
rapaelec
  • 1,238
  • 12
  • 10
9

Try this. Open a new terminal and paste it

sudo dpkg -i --force-overwrite  /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb

After that type:

sudo apt-get autoremove

Lastly type

sudo apt-get update

hope your problem will be solved.

orvi
  • 3,142
  • 1
  • 23
  • 36
3

none of the solutions i could find solved the problem for me...still broken packes, no matter the autoremove, -f install ... and so forth.

After playing around a little, the following solved it for me:

sudo apt-get --purge remove libc6-dev-i386 libc6-dev-x32 gcc-5-multilib gcc-multilib

sudo apt autoremove -f

sudo apt-get -f install
Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
David
  • 425
  • 4
  • 9
  • This worked for me on Ubuntu on WSL. I didn't know which package broke my system, but it was probably one of those removed by the first command here. – tfpf Nov 09 '22 at 16:49
3

I found my solution, because the others quoted below did not work. Generally, it is a conflict with a dependency already installed.

I solved this problem with these command for recreate blank configuration (debian) :

  • sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_silent
  • sudo mkdir /var/lib/dpkg/info
  • sudo apt-get update
  • sudo apt-get -f install <xxxx>
Sacha Durand
  • 473
  • 1
  • 5
  • 11
2

Try the following steps from the terminal :

 sudo apt-get --purge remove libc6-dev-amd64 

 sudo apt-get -f install

 sudo apt-get update

Hope this will fix your issues.

Jai Chauhan
  • 4,035
  • 3
  • 36
  • 62
Basheer.O
  • 477
  • 5
  • 8
1

Try is to reconfigure the package database. Probably the database got corrupted while installing a package. sudo dpkg --configure -a

Aditya Pawaskar
  • 243
  • 4
  • 11
0

It looks like you have installed libc6-dev-amd64 and you are trying to install packages that depend on libc6-dev-i386, and these two are in conflict (they both contain /usr/include/bits).

My guess is you don't want both of these installed at the same time. I would use apt-get remove libc6-dev-amd64 to get yourself back to a good state, and then try again to install the packages that you want.

If those two packages are meant to work when they're both installed at the same time, then file a bug with the package maintainer because they need to fix the packages to allow that.

Jai Chauhan
  • 4,035
  • 3
  • 36
  • 62
Ewan Mellor
  • 6,747
  • 1
  • 24
  • 39
0

When the upgrade command (sudo apt-get upgrade -y) is run in Ubuntu 18.04.3 (With Linux kernel version 5.7.14) the following errors get reported (in red):

... bind /var/run/spice-vdagentd/spice-vdagent-sock: No such file or directory
... Fatal could not create server socket /var/run/spice-vdagentd/spice-vdagent-sock
...
... Failed to start Agent daemon for Spice guests.

The following steps fixed the issue:

  1. Make spice-vdagentd directory if it does not exist:
> sudo mkdir /var/run/spice-vdagentd (if it does not exist)
  1. Open a new file spice-vdagent-sock
> sudo vi /var/run/spice-vdagentd/spice-vdagent-sock
  1. Save the file by running: :wq
  2. Re-run the upgrade command to verify that the issue is fixed.
BR M
  • 101
  • 7
0

Using below steps my problem resolve in "Oracle VM VirtualBox Manager"

  1. apt autoremove

  2. apt purge libreoffice-base libreoffice-core

  3. dpkg -l "libreoffice" | grep "^ii"

  4. sudo dpkg --configure -a

  5. sudo apt-get install -f

now you can try to install - pip3 install jupyter etc.

Vijay
  • 141
  • 7
-1

You can fix this problem with this command:

 sudo apt-get remove --purge libreoffice-core libreoffice-common
python3-uno libreoffice-*
NelsonGon
  • 13,015
  • 7
  • 27
  • 57
Talat Parwez
  • 129
  • 4
  • Before anyone trys a command like this ensure you check what else will be removed during this process, if you don't like what is being removed then say No. You can purge things 1 at a time. Not saying this is wrong, but these answers can mess up systems. – TheArchitecta Jul 08 '21 at 09:49