Installing NVIDIA driver for Debian Stretch

You need to enable the non-free repositories:

sudo sed -i.bak 's/stretch[^ ]* main$/& contrib non-free/g' /etc/apt/sources.list

Then run apt update and try your installation again. You’ll probably also need to install the kernel headers if you haven’t already:

sudo apt install linux-headers-$(uname -r)

See the full instructions on the Debian wiki.


I had a similar problem. I solved it by removing backports from sources

from this issue https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906903

We have had this before ... having both stretch and stretch-backports enabled and trying to track stretch does not work currently for the nvidia driver ... too many changes w.r.t. libglvnd etc.


Since this doesn't have an accepted answer yet, I'll go ahead and chip in what worked for me. I was having a very similar issue, with many of the same packages complaining, but there were an additional two PreDepends issues that stretch-backports was not resolving. Turns out, in addition to the instructions in the wiki page Stephen posted (https://wiki.debian.org/NvidiaGraphicsDrivers), I needed to add contrib for stretch. That is, in /etc/apt/sources.list, I changed

deb http://ftp.us.debian.org/debian/ stretch main

to

deb http://ftp.us.debian.org/debian/ stretch main contrib

and ran apt update, after which i was able to install nvidia-drivers without issue.