1
OS: Debian stretch
linux kernel: 4.7.0-1-amd64

I have unmet dependencies between some nvidia packages. They seem to be caused by libnvidia-glcore and libnvidia-eglcore Forcing them through apt/dpkg/aptitude doesn't seem to work. apt-get install -f gives me this output:

root@debdesk:~# apt-get upgrade -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages have been kept back:
  libslang2 libslang2-dev linux-headers-4.7.0-1-amd64
  linux-headers-4.7.0-1-common linux-image-4.7.0-1-amd64
The following packages will be upgraded:
  libnvidia-eglcore libnvidia-glcore
2 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
13 not fully installed or removed.
Need to get 0 B/12.5 MB of archives.
After this operation, 28.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 251496 files and directories currently installed.)
Preparing to unpack .../0-libnvidia-glcore_367.44-2_amd64.deb ...
Unpacking libnvidia-glcore:amd64 (367.44-2) over (352.79-10~bpo8+2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-sOf2cJ/0-libnvidia-glcore_367.44-2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/bug/libnvidia-glcore/script', which is different from other instances of package libnvidia-glcore:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../1-libnvidia-eglcore_367.44-2_amd64.deb ...
Unpacking libnvidia-eglcore:amd64 (367.44-2) over (352.79-10~bpo8+2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-sOf2cJ/1-libnvidia-eglcore_367.44-2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libnvidia-eglcore/changelog.Debian.gz', which is different from other instances of package libnvidia-eglcore:amd64
Errors were encountered while processing:
 /tmp/apt-dpkg-install-sOf2cJ/0-libnvidia-glcore_367.44-2_amd64.deb
 /tmp/apt-dpkg-install-sOf2cJ/1-libnvidia-eglcore_367.44-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 

apt-cache policy libnvidia-glcore libnvidia-glcore:i386 prints the following:

libnvidia-glcore:
  Installed: 352.79-10~bpo8+2
  Candidate: 367.44-2
  Version table:
     367.44-2 500
        500 http://ftp.de.debian.org/debian stretch/non-free amd64 Packages
        500 http://httpredir.debian.org/debian stretch/non-free amd64 Packages
 *** 352.79-10~bpo8+2 100
        100 http://httpredir.debian.org/debian jessie-backports/non-free amd64 Packages
        100 /var/lib/dpkg/status
libnvidia-glcore:i386:
  Installed: 367.44-2
  Candidate: 367.44-2
  Version table:
 *** 367.44-2 500
        500 http://ftp.de.debian.org/debian stretch/non-free i386 Packages
        500 http://httpredir.debian.org/debian stretch/non-free i386 Packages
        100 /var/lib/dpkg/status
     352.79-10~bpo8+2 100
        100 http://httpredir.debian.org/debian jessie-backports/non-free i386 Packages

Some time ago I tried to install some packages from the experimental branch and I left the source saved in the sources file. I've been using the nvidia-driver build fetched from jessie-backports. Here is what/etc/apt/sources.list looks like:

# deb cdrom:[Debian GNU/Linux stretch-DI-alpha7 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20160630-14:29]/ stretch main

#deb cdrom:[Debian GNU/Linux stretch-DI-alpha7 _Stretch_ - Official Snapshot amd64 NETINST Binary-1 20160630-14:29]/ stretch main

deb http://ftp.es.debian.org/debian/ stretch main
deb-src http://ftp.es.debian.org/debian/ stretch main

deb http://ftp.de.debian.org/debian experimental main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

deb http://ftp.de.debian.org/debian stretch main non-free
deb http://httpredir.debian.org/debian/ stretch main contrib non-free

deb http://httpredir.debian.org/debian jessie-backports main contrib non-free

I can't purge nor reinstall the installation because of those dependencies.

What can I do?

edit:

output of apt-get purge libnvidia-eglcore libnvidia-glcore

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:
 libegl-nvidia0 : Depends: libnvidia-eglcore (= 367.44-2) but it is not going to be installed
 libgl1-nvidia-glx : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
 libgles-nvidia1 : Depends: libnvidia-eglcore (= 367.44-2) but it is not going to be installed
 libgles-nvidia2 : Depends: libnvidia-eglcore (= 367.44-2) but it is not going to be installed
 libglx-nvidia0 : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
 nvidia-driver-libs : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
                      Recommends: nvidia-driver-libs-i386
 xserver-xorg-video-nvidia : Depends: libnvidia-glcore (= 367.44-2) but it is not going to be installed
                             Recommends: nvidia-settings (>= 367) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
  • The technical term for what you have here is a mess. It's probably fixable, but it's not worth anyone's time. I suggest you reinstall. I don't understand "I can't purge nor reinstall the installation because of those dependencies." What do you mean? – Faheem Mitha Oct 3 '16 at 17:48
  • Just for the hell of it, what does "apt-get purge libnvidia-eglcore libnvidia-glcore" give? Or try purging the packages individually. Output in the question, not in comments, please. – Faheem Mitha Oct 3 '16 at 17:54
  • Yeah, it's a huge mess ): It doesn't seem like I can use the package manager any more because no matter what I do I get redirected to the error and nothing happens. – qkthr Oct 3 '16 at 18:00
  • Damn that was so silly, I've read the output of apt-get purge again since you asked for it and tried to remove all the dependencies one by one. First time I did that, it would spit even more dependencies so I thought that wasn't the way to follow, but I kept doing it and managed to fix it. Now I'm trying to cut with the multi repos for this particular case. Such a silly question, yet so much to learn. I always ask silly stuff, thank you for your time though; I really appreciate it. – qkthr Oct 3 '16 at 18:30
  • If you managed to fix your problem, post an answer. It might be useful for someone else later. – Faheem Mitha Oct 3 '16 at 18:51
0

So I think I finally purged the whole nvidia thing and managed to install a completely new set of packages.

I had to manually purge the packages that were giving me the error dependencies and then I had some issues with residual libs and configs that were still installed after purging nvidia-* through apt-get, so I also made sure to remove everything that fell under libnvidia-* regex, which didn't look like it would break anything after reading what would get uninstalled.

After that I rebooted and made sure I cleared any temporal or residual package and files, installed the nvidia drivers using the jessie-backports deb I have in /etc/apt/sourceslist (manually fixing dependencies myself and avoiding aptitude to take care of them) and everything now werks. Thanks dr greenthumb, you're the shit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.