PDA

View Full Version : pkg manager error ; broken pkgs:- libstdc++6 ; apt upgrade...fails on kali 2018.1



lolthunder
2018-03-27, 05:05
Lets get straight to the point i have a kali linux 2018.1 and following info is reveled when i run uname -a

root@lolt:~ :-) $ uname -a
Linux lolt 4.14.0-kali3-amd64 #1 SMP Debian 4.14.17-1kali1 (2018-02-16) x86_64 GNU/Linux

Now proceeding towards the problem, it first occured to me when i was updating my kali box using the apt-get upgarde - y command:confused:


root@lolt:~ :-) $ apt-get upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-8-base (= 8-20180312-2) but 8-20180218-1 is installed
Breaks: libstdc++6:i386 (!= 8-20180312-2) but 8-20180218-1 is installed
libstdc++6:i386 : Breaks: libstdc++6 (!= 8-20180218-1) but 8-20180312-2 is installed
mame : Depends: libportmidi0 but it is not installed
Depends: libsdl2-ttf-2.0-0 (>= 2.0.14) but it is not installed
Depends: mame-data (= 0.189+dfsg.1-1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


As specified in the above output i ran apt --fix-broken install and got the following output


root@lolt:~ :-) $ apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-8-base (= 8-20180312-2) but 8-20180218-1 is installed
Breaks: libstdc++6:i386 (!= 8-20180312-2) but 8-20180218-1 is installed
libstdc++6:i386 : Breaks: libstdc++6 (!= 8-20180218-1) but 8-20180312-2 is installed
mame : Depends: libportmidi0 but it is not installed
Depends: libsdl2-ttf-2.0-0 (>= 2.0.14) but it is not installed
Depends: mame-data (= 0.189+dfsg.1-1) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Then i decided to run apt upgrade even though i kinda knew i would end up with same error..which i did.

afterwards i ran the following to get rid the broken pkgs :-

root@hacker:~ :-) $ dpkg --remove --force-remove-reinstreq libstdc++6:i386
dpkg: dependency problems prevent removal of libstdc++6:i386:
libvpx5:i386 depends on libstdc++6 (>= 4.1.1).
libglu1-mesa:i386 depends on libstdc++6 (>= 4.1.1).
libjack-jackd2-0:i386 depends on libstdc++6 (>= 5.2).
mesa-va-drivers:i386 depends on libstdc++6 (>= 5.2).
libsnappy1v5:i386 depends on libstdc++6 (>= 5.2).
libcrystalhd3:i386 depends on libstdc++6 (>= 4.1.1).
libx265-146:i386 depends on libstdc++6 (>= 4.1.1).
libvpx4:i386 depends on libstdc++6 (>= 4.1.1).
libicu57:i386 depends on libstdc++6 (>= 5.2).
libllvm5.0:i386 depends on libstdc++6 (>= 6).
libgl1-mesa-dri:i386 depends on libstdc++6 (>= 5.2).
mesa-vdpau-drivers:i386 depends on libstdc++6 (>= 5.2).
libosmesa6:i386 depends on libstdc++6 (>= 5).
libvdpau-va-gl1:i386 depends on libstdc++6 (>= 6).

dpkg: error processing package libstdc++6:i386 (--remove):
dependency problems - not removing
Errors were encountered while processing:
libstdc++6:i386






Due to these errors i am not able to upgrade my kali which is an issue because it gets a lot of update in order to maintain all the tools inside of it . if not necessary then i would like to get rid of the broken pkgs that are causing this problem so that i can proceed with the upgrade but if i need then in future i will just install hem again.

i have been using linux for bout an year and have just shifted from fedora to kali but had never a broken pkg error that would mess up my system this much i would love some urgent help in the matter.


Thanks for helpinghttps://lqo-thequestionsnetw.netdna-ssl.com/questions/images/smilies/smile.gif

Mister_X
2018-03-27, 15:21
Run apt-get update && apt-get dist-upgrade

lolthunder
2018-03-27, 16:36
Run apt-get update && apt-get dist-upgrade

I RAN THE COMMAND AND GOT THE FOLLOWING OUTPUT:-


root@hacker:~ :-) $ apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libstdc++6 : Depends: gcc-8-base (= 8-20180312-2) but 8-20180218-1 is installed
Breaks: libstdc++6:i386 (!= 8-20180312-2) but 8-20180218-1 is installed
libstdc++6:i386 : Breaks: libstdc++6 (!= 8-20180218-1) but 8-20180312-2 is installed
mame : Depends: libportmidi0 but it is not installed
Depends: libsdl2-ttf-2.0-0 (>= 2.0.14) but it is not installed
Depends: mame-data (= 0.189+dfsg.1-1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Tauheed khan
2018-04-04, 08:39
i am also facing the same problem and not able to install any package because of dependency error.

root@cybernix$ apt --fix-broken install

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
cpp-6 cpp-7 g++-6 g++-7 gcc-6 gcc-6-base gcc-7 gcc-7-base gcc-8-base lib64gcc1 lib64stdc++6 libasan3
libasan4 libatomic1 libc-bin libc-dev-bin libc6 libc6-amd64 libc6-dev libcc1-0 libcilkrts5 libexpat1
libexpat1-dev libgcc-6-dev libgcc-7-dev libgcc1 libgfortran3 libgfortran4 libgomp1 libitm1 libmpx2
libobjc-6-dev libobjc4 libquadmath0 libstdc++-6-dev libstdc++-7-dev libstdc++6 libubsan0 locales
Suggested packages:
gcc-6-locales gcc-7-locales g++-6-multilib gcc-6-doc libstdc++6-6-dbg g++-7-multilib gcc-7-doc
libstdc++6-7-dbg gcc-6-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg
liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg gcc-7-multilib
libasan4-dbg glibc-doc libstdc++-6-doc libstdc++-7-doc
The following NEW packages will be installed:
libc-dev-bin libc6-amd64 libc6-dev locales
The following packages will be upgraded:
cpp-6 cpp-7 g++-6 g++-7 gcc-6 gcc-6-base gcc-7 gcc-7-base gcc-8-base lib64gcc1 lib64stdc++6 libasan3
libasan4 libatomic1 libc-bin libc6 libcc1-0 libcilkrts5 libexpat1 libexpat1-dev libgcc-6-dev libgcc-7-dev
libgcc1 libgfortran3 libgfortran4 libgomp1 libitm1 libmpx2 libobjc-6-dev libobjc4 libquadmath0
libstdc++-6-dev libstdc++-7-dev libstdc++6 libubsan0
35 upgraded, 4 newly installed, 0 to remove and 2110 not upgraded.
1 not fully installed or removed.
Need to get 0 B/69.7 MB of archives.
After this operation, 59.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: warning: files list file for package 'libc6-dbg:i386' missing; assuming package has no files currently installed
(Reading database ... 417961 files and directories currently installed.)
Preparing to unpack .../archives/libc6_2.27-2_i386.deb ...
readlink: invalid option -- 'm'
BusyBox v1.22.1 (Debian 1:1.22.0-19+b2) multi-call binary.

Usage: readlink [-fnv] FILE

Display the value of a symlink

-f Canonicalize by following all symlinks
-n Don't add newline
-v Verbose

dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-2_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Mister_X
2018-04-05, 21:09
What does your sources.list (and sources.list.d) contain?

Tauheed khan
2018-04-06, 08:38
What does your sources.list (and sources.list.d) contain?

root@Cybernix]$ cat /etc/apt/sources.list

deb http://http.kali.org/kali kali-rolling main contrib non-free
# For source package access, uncomment the following line
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free




root@Cybernix] $ dpkg --audit


Another process has locked the database for writing, and might currently be
modifying it, some of the following problems might just be due to that.

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
libc6-dbg:i386 GNU C Library: detached debugging symbols

The following packages have been triggered, but the trigger processing
has not yet been done. Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
libc-bin GNU C Library: Binaries

The following packages are missing the list control file in the
database, they need to be reinstalled:
libc6-dbg:i386 GNU C Library: detached debugging symbols

The following packages are missing the md5sums control file in the
database, they need to be reinstalled:
libc6-dbg:i386 GNU C Library: detached debugging symbols




root@Cybernix] $ apt --fix-broken install

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
cpp-6 cpp-7 g++-6 g++-7 gcc-6 gcc-6-base gcc-7 gcc-7-base gcc-8-base lib64gcc1 lib64stdc++6 libasan3 libasan4 libatomic1 libc-bin libc-dev-bin
libc6 libc6-amd64 libc6-dbg libc6-dev libcc1-0 libcilkrts5 libexpat1 libexpat1-dev libgcc-6-dev libgcc-7-dev libgcc1 libgfortran3 libgfortran4
libgomp1 libitm1 libmpx2 libobjc-6-dev libobjc4 libquadmath0 libstdc++-6-dev libstdc++-7-dev libstdc++6 libubsan0 locales
Suggested packages:
gcc-6-locales gcc-7-locales g++-6-multilib gcc-6-doc libstdc++6-6-dbg g++-7-multilib gcc-7-doc libstdc++6-7-dbg gcc-6-multilib libgcc1-dbg
libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg
gcc-7-multilib libasan4-dbg glibc-doc libstdc++-6-doc libstdc++-7-doc
The following NEW packages will be installed:
libc-dev-bin libc6-amd64 libc6-dev locales
The following packages will be upgraded:
cpp-6 cpp-7 g++-6 g++-7 gcc-6 gcc-6-base gcc-7 gcc-7-base gcc-8-base lib64gcc1 lib64stdc++6 libasan3 libasan4 libatomic1 libc-bin libc6 libc6-dbg
libcc1-0 libcilkrts5 libexpat1 libexpat1-dev libgcc-6-dev libgcc-7-dev libgcc1 libgfortran3 libgfortran4 libgomp1 libitm1 libmpx2 libobjc-6-dev
libobjc4 libquadmath0 libstdc++-6-dev libstdc++-7-dev libstdc++6 libubsan0
36 upgraded, 4 newly installed, 0 to remove and 2115 not upgraded.
1 not fully installed or removed.
Need to get 0 B/85.8 MB of archives.
After this operation, 58.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Reading changelogs... Done
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: warning: files list file for package 'libc6-dbg:i386' missing; assuming package has no files currently installed
(Reading database ... 417649 files and directories currently installed.)
Preparing to unpack .../libc6-dbg_2.27-3_i386.deb ...
Unpacking libc6-dbg:i386 (2.27-3) over (2.27-2) ...
Preparing to unpack .../archives/libc6_2.27-3_i386.deb ...
readlink: invalid option -- 'm'
BusyBox v1.22.1 (Debian 1:1.22.0-19+b2) multi-call binary.

Usage: readlink [-fnv] FILE

Display the value of a symlink

-f Canonicalize by following all symlinks
-n Don't add newline
-v Verbose

dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)







root@Cybernix] $ apt --fix-missing install

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not installed or
libc-dev
clang-3.8 : Depends: libc6-dev but it is not installed
lib64gcc1 : Depends: libc6-amd64 (>= 2.14) but it is not installed
lib64stdc++6 : Depends: libc6-amd64 (>= 2.18) but it is not installed
libbluetooth-dev : Depends: libc6-dev but it is not installed or
libc-dev
libc6-dbg : Depends: libc6 (= 2.27-3) but 2.25-3 is installed
libclang-common-3.8-dev : Depends: libc6-amd64 (>= 2.2.5) but it is not installed
libexpat1-dev : Depends: libc6-dev but it is not installed or
libc-dev
libjpeg62-turbo-dev : Depends: libc-dev
libpcap0.8-dev : Depends: libc6-dev but it is not installed
libstdc++-6-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
libstdc++-7-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
postgresql-9.6 : Depends: locales but it is not installed
zlib1g-dev : Depends: libc6-dev but it is not installed or
libc-dev
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


also tried,

apt-get autoclean
apt-get clean

n1kk
2018-11-17, 16:19
have the same error still finding ways to answer it

Bushido
2018-11-18, 02:47
Try this:
1). dpkg --configure -a
2). apt-get clean && apt-get autoremove && apt-get update
If that worked then apt-get update && apt-get dist-upgrade

If that didn't work, try this...
apt-get install -f

If that doesn't work you need to purge the broken dependencies like so...
apt-get install purge (dependency name here)

Without the parentheses of course. Do that for every broken dependency.

Then install what you were trying to install and if need be re-install the dependencies you need.

lolthunder
2018-11-18, 06:31
i am also facing the same problem and not able to install any package because of dependency error.

root@cybernix$ apt --fix-broken install

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
cpp-6 cpp-7 g++-6 g++-7 gcc-6 gcc-6-base gcc-7 gcc-7-base gcc-8-base lib64gcc1 lib64stdc++6 libasan3
libasan4 libatomic1 libc-bin libc-dev-bin libc6 libc6-amd64 libc6-dev libcc1-0 libcilkrts5 libexpat1
libexpat1-dev libgcc-6-dev libgcc-7-dev libgcc1 libgfortran3 libgfortran4 libgomp1 libitm1 libmpx2
libobjc-6-dev libobjc4 libquadmath0 libstdc++-6-dev libstdc++-7-dev libstdc++6 libubsan0 locales
Suggested packages:
gcc-6-locales gcc-7-locales g++-6-multilib gcc-6-doc libstdc++6-6-dbg g++-7-multilib gcc-7-doc
libstdc++6-7-dbg gcc-6-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg
liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg gcc-7-multilib
libasan4-dbg glibc-doc libstdc++-6-doc libstdc++-7-doc
The following NEW packages will be installed:
libc-dev-bin libc6-amd64 libc6-dev locales
The following packages will be upgraded:
cpp-6 cpp-7 g++-6 g++-7 gcc-6 gcc-6-base gcc-7 gcc-7-base gcc-8-base lib64gcc1 lib64stdc++6 libasan3
libasan4 libatomic1 libc-bin libc6 libcc1-0 libcilkrts5 libexpat1 libexpat1-dev libgcc-6-dev libgcc-7-dev
libgcc1 libgfortran3 libgfortran4 libgomp1 libitm1 libmpx2 libobjc-6-dev libobjc4 libquadmath0
libstdc++-6-dev libstdc++-7-dev libstdc++6 libubsan0
35 upgraded, 4 newly installed, 0 to remove and 2110 not upgraded.
1 not fully installed or removed.
Need to get 0 B/69.7 MB of archives.
After this operation, 59.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: warning: files list file for package 'libc6-dbg:i386' missing; assuming package has no files currently installed
(Reading database ... 417961 files and directories currently installed.)
Preparing to unpack .../archives/libc6_2.27-2_i386.deb ...
readlink: invalid option -- 'm'
BusyBox v1.22.1 (Debian 1:1.22.0-19+b2) multi-call binary.

Usage: readlink [-fnv] FILE

Display the value of a symlink

-f Canonicalize by following all symlinks
-n Don't add newline
-v Verbose

dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-2_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't think the problem has a solution so in the end I just reinstalled kali and that solved all the problems.

lolthunder
2018-11-18, 06:32
Try this:
1). dpkg --configure -a
2). apt-get clean && apt-get autoremove && apt-get update
If that worked then apt-get update && apt-get dist-upgrade

If that didn't work, try this...
apt-get install -f

If that doesn't work you need to purge the broken dependencies like so...
apt-get install purge (dependency name here)

Without the parentheses of course. Do that for every broken dependency.

Then install what you were trying to install and if need be re-install the dependencies you need.

Tried all of that a hundred times

Mister_X
2018-11-20, 21:34
Sorry for not reading carefully.

The only way I see this solved is by reinstalling the whole system. Just grab the latest ISO.