I am trying to install a driver for NVIDIA GTX1060 on my laptop. I used the official method. I ran NVIDIA script, and it shows:

Unable to build the NVIDIA kernel module

I have installed Linux kernel using this command:

apt-get install linux-headers-$(uname -r|sed 's/[^-]*-[^-]*-//')

I'm using Debian 9.

Apt source file:

quidam@debian:~$ cat /etc/apt/sources.list
# 

# deb cdrom:[Debian GNU/Linux 9.5.0 _Stretch_ - Official amd64 NETINST 20180714-10:25]/ stretch main

#deb cdrom:[Debian GNU/Linux 9.5.0 _Stretch_ - Official amd64 NETINST 20180714-10:25]/ stretch main

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

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

# stretch-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ stretch-updates main
deb-src http://ftp.fr.debian.org/debian/ stretch-updates main
# stretch-backports
deb http://httpredir.debian.org/debian stretch-backports main contrib non-free
  • 1
    Have you installed the nvidia-kernel package? – vfbsilva Sep 13 at 21:00
  • root@debian:/home/quidam# apt-get install nvidia-kernel Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package nvidia-kernel – Mike Delta Sep 14 at 5:39
  • Please edit your post to include your sources.list. If it cannot locate the package you may need to add the non-free repo to your sources.list – kemotep Sep 14 at 12:24
  • Hello kemotep, done. – Mike Delta Sep 14 at 15:23
  • Any reason you do not use the debian packaged version (in non-free) of NVIDIA drivers ? – sebasth Sep 14 at 15:40

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.