apt-get error: Sub-process /usr/bin/dpkg returned an error code (1)
Asked Answered
P

10

19

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)
Phanerogam answered 5/6, 2015 at 23:56 Comment(2)
You may find more help on askubuntu.com.Spouse
Do you use unstable or testing repositories? If so, define it manually: apt-get -t unstable install ... Pterosaur
P
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>
Pintle answered 17/4, 2018 at 9:7 Comment(1)
I had 4 packages, I removed all of these one by one and the issue was resolved.Riel
V
12

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.

Vickers answered 12/7, 2015 at 6:33 Comment(0)
A
3

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.

Actionable answered 14/8, 2015 at 13:34 Comment(1)
E: Unable to locate package libc6-dev-amd64Salivate
A
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
Abnormality answered 29/10, 2016 at 13:52 Comment(1)
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.Howardhowarth
P
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>
Pyle answered 22/8, 2022 at 12:42 Comment(0)
N
1

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

Newfoundland answered 27/12, 2018 at 11:18 Comment(0)
W
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.

Warehouseman answered 6/6, 2015 at 0:17 Comment(1)
i try remove the package, but i have the same error that have when try install g++Phanerogam
U
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.
Underwing answered 3/12, 2020 at 23:49 Comment(0)
C
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.

Cosmopolitan answered 14/12, 2020 at 12:33 Comment(0)
M
-1

You can fix this problem with this command:

 sudo apt-get remove --purge libreoffice-core libreoffice-common
python3-uno libreoffice-*
Mablemabry answered 20/7, 2016 at 17:37 Comment(1)
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.Bisson

© 2022 - 2024 — McMap. All rights reserved.