Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)
like image 639
user3815068 Avatar asked Jun 05 '15 23:06

user3815068


People also ask

What is dpkg error Linux?

The error can be caused by multiple reasons. You might have lost your internet connection, the package being installed was corrupted, or another issue you can't point out. The problem with not knowing why the error occurred is that you can't solve the issue straight away.

How do I install dpkg?

Simply type dpkg followed by –install or –i option and the . deb file name. Also, the dpkg will not install the package and will leave it in an unconfigurable and broken state. This command will fix the broken package and install the required dependencies assuming they are available in the system repository.


2 Answers

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>
like image 144
rapaelec Avatar answered Sep 20 '22 18:09

rapaelec


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.

like image 28
orvi Avatar answered Sep 22 '22 18:09

orvi