1

I tried to remove all wrong nvidia drivers through: apt-get remove nvidia*

However, when I now try to install any package it tells me:

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: glx-alternative-nvidia : Depends: glx-diversions (= 0.8.0) E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 

then using --fix-broken:

apt-get --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: libcublas8.0 libcudart8.0 libcufft8.0 libcufftw8.0 libcurand8.0 libcusolver8.0 libcusparse8.0 libnppc8.0 libnppi8.0 libnppial8.0 libnppicc8.0 libnppicom8.0 libnppidei8.0 libnppif8.0 libnppig8.0 libnppim8.0 libnppist8.0 libnppisu8.0 libnppitc8.0 libnpps8.0 libnvblas8.0 libnvgraph8.0 libnvidia-compiler libnvidia-fatbinaryloader libnvidia-fatbinaryloader:i386 libnvidia-ptxjitcompiler libnvidia-ptxjitcompiler:i386 libnvrtc8.0 libnvtoolsext1 libnvvm3 libopengl0:i386 libthrust-dev libvdpau-dev Use 'apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. Need to get 0 B/10.5 kB of archives. After this operation, 0 B of additional disk space will be used. dpkg: dependency problems prevent configuration of glx-alternative-nvidia: glx-alternative-nvidia depends on glx-diversions (= 0.8.0); however: Package glx-diversions is not installed. dpkg: error processing package glx-alternative-nvidia (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of nvidia-alternative: nvidia-alternative depends on glx-alternative-nvidia (>= 0.7); however: Package glx-alternative-nvidia is not configured yet. dpkg: error processing package nvidia-alternative (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: glx-alternative-nvidia nvidia-alternative E: Sub-process /usr/bin/dpkg returned an error code (1) 

when I try removing the packages:

apt-get remove glx-alternative-nvidia 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: nvidia-alternative : Depends: glx-alternative-nvidia (>= 0.7) E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 

sources.list:

cat /etc/apt/sources.list deb http://http.kali.org/kali kali-rolling main contrib non-free deb-src http://http.kali.org/kali kali-rolling main contrib non-free #deb http://repo.xplico.org/ kali-rolling main 

DPKG --configure -a && apt update:

root@Anonymous:~# dpkg --configure -a dpkg: dependency problems prevent configuration of glx-alternative-nvidia: glx-alternative-nvidia depends on glx-diversions (= 0.8.0); however: Package glx-diversions is not installed. dpkg: error processing package glx-alternative-nvidia (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of nvidia-alternative: nvidia-alternative depends on glx-alternative-nvidia (>= 0.7); however: Package glx-alternative-nvidia is not configured yet. dpkg: error processing package nvidia-alternative (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: glx-alternative-nvidia nvidia-alternative root@Anonymous:~# apt update Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease Hit:3 http://dl.google.com/linux/chrome/deb stable Release Hit:4 https://deb.nodesource.com/node_8.x jessie InRelease Hit:6 http://ftp2.nluug.nl/os/Linux/distr/kali kali-rolling InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. root@Anonymous:~# 

cat /etc/apt/sources.list.d/*:

cat /etc/apt/sources.list.d/* ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main deb https://deb.nodesource.com/node_8.x jessie main deb-src https://deb.nodesource.com/node_8.x jessie main ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main 

dpkg --remove --force-remove-reinstreq nvidia-alternative:

dpkg --remove --force-remove-reinstreq nvidia-alternative dpkg: dependency problems prevent removal of nvidia-alternative: nvidia-driver-bin depends on nvidia-alternative (= 375.82-7). libgles-nvidia1:i386 depends on nvidia-alternative (= 375.82-7). libgles-nvidia1:amd64 depends on nvidia-alternative (= 375.82-7). libnvidia-ml1:i386 depends on nvidia-alternative (= 375.82-7). libnvidia-ml1:amd64 depends on nvidia-alternative (= 375.82-7). libgles1-glvnd-nvidia:i386 depends on nvidia-alternative (= 375.82-7). libgles1-glvnd-nvidia:amd64 depends on nvidia-alternative (= 375.82-7). libnvidia-cfg1:i386 depends on nvidia-alternative (= 375.82-7). libnvidia-cfg1:amd64 depends on nvidia-alternative (= 375.82-7). libgles-nvidia2:amd64 depends on nvidia-alternative (= 375.82-7). libgles-nvidia2:i386 depends on nvidia-alternative (= 375.82-7). libegl-nvidia0:i386 depends on nvidia-alternative (= 375.82-7). nvidia-vdpau-driver:amd64 depends on nvidia-alternative (= 375.82-7). nvidia-settings depends on nvidia-alternative. libglx-nvidia0:i386 depends on nvidia-alternative (= 375.82-7). libglx-nvidia0:amd64 depends on nvidia-alternative (= 375.82-7). dpkg: error processing package nvidia-alternative (--remove): dependency problems - not removing Errors were encountered while processing: nvidia-alternative 

ls /var/lib/dpkg/status:

root@Anonymous:~# ls /var/lib/dpkg/status* /var/lib/dpkg/status /var/lib/dpkg/status-old 

dpkg --configure -a:

root@Anonymous:~# cp /var/lib/dpkg/status-old /var/lib/dpkg/status root@Anonymous:~# dpkg --configure -a root@Anonymous:~# apt update Get:1 http://ftp2.nluug.nl/os/Linux/distr/kali kali-rolling InRelease [30.5 kB] Get:2 http://ftp2.nluug.nl/os/Linux/distr/kali kali-rolling/main Sources [11.5 MB] Get:3 http://ftp2.nluug.nl/os/Linux/distr/kali kali-rolling/main i386 Packages [15.3 MB] Get:4 http://ftp2.nluug.nl/os/Linux/distr/kali kali-rolling/main amd64 Packages [15.4 MB] Fetched 42.3 MB in 13s (3,250 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 14 packages can be upgraded. Run 'apt list --upgradable' to see them. root@Anonymous:~# apt upgrade -y && apt dist-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: E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 

from post 'dpkg: error: cannot remove architecture 'i386' currently in use by the database':

apt-get remove --purge `dpkg --get-selections | grep i386 | awk '{print $1}'` 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: glx-alternative-nvidia : Depends: glx-diversions (= 0.8.0) lib32gcc1 : Depends: libc6-i386 (>= 2.2.4) but it is not going to be installed lib32ncurses5 : Depends: libc6-i386 (>= 2.4) but it is not going to be installed lib32stdc++6 : Depends: libc6-i386 (>= 2.18) but it is not going to be installed lib32tinfo5 : Depends: libc6-i386 (>= 2.16) but it is not going to be installed lib32z1 : Depends: libc6-i386 (>= 2.4) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 
6
  • 1
    What is the output of cat /etc/apt/sources.list ? Commented Nov 2, 2017 at 18:59
  • @GAD3R I updated my post with the output Commented Nov 2, 2017 at 19:01
  • 1
    dpkg --configure -a then apt update did you get an error? Commented Nov 2, 2017 at 19:08
  • Yup, same error, also updated post Commented Nov 2, 2017 at 19:10
  • 1
    please add the output of cat /etc/apt/sources.list.d/* Commented Nov 2, 2017 at 19:11

2 Answers 2

5

Remove the NVIDIA-related .list files under /etc/apt/sources.list.d/. It will break your system later.

Then run:

mv /var/lib/dpkg/info/glx-alternative-nvidia.* /tmp/ mv /var/lib/dpkg/info/nvidia-alternative.* /tmp/ dpkg --remove --force-remove-reinstreq nvidia-alternative dpkg --remove --force-remove-reinstreq glx-alternative-nvidia dpkg --configure -a apt update apt upgrade apt dist-upgrade 
10
  • failing at --force-remove-reinstreq nvidia-alternative (i will update post) Commented Nov 2, 2017 at 19:44
  • same results.. Its a nasty one :\ Commented Nov 2, 2017 at 19:55
  • Updated with results Commented Nov 2, 2017 at 20:14
  • 1
    @NickProzee cp /var/lib/dpkg/status-old /var/lib/dpkg/status then run the command from dpkg --configure -a Commented Nov 2, 2017 at 20:16
  • 1
    dpkg --remove-architecture i386 then dpkg --configure -a and apt clean && apt autoremove && apt update && apt upgrade && apt dist-upgrade Commented Nov 2, 2017 at 20:28
-1

just

sudo dpkg -r glx-alternative-nvidia sudo dpkg -r nvidia-alternative 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.