Installing Nvidia drivers with pkg1.run ends with "no Version.h found"
Ok, seems like you have been playing way too much with your installation... please read everything before doing anything.
The only thing you need to do was install the kernel headers and everything would be fine:
sudo apt-get install linux-generic
That was the only thing you have to do and would solve the "The kernel header file 'version.h' does not exist." error... Now we need to revert what you have done to make it right.
How can I configure the kernel source files? There is nothing like sudo make-prepare or sudo get-apt kernel-devel right?
You don't need to configure anything. If you use APT everything will be placed just fine. Also, you don't need sudo
to do make
. There is no get-apt
nor make-prepare
commands, so wherever you saw those just close that page and don't trust anything said there.
A workaround suggested to copy the version.h (cp -v /usr/include/linux/version.h /lib/modules/$(uname -r)/build/include/linux) which lead to this error:
You must only follow the guides in the last 1 year and from people that knows what they are doing... the /usr/include/linux/version.h
file and /lib/modules/$(uname -r)/build/include/linux
are essentially provided by different packages. The one in usr
is provided by linux-libc-dev
while the one you need is provided by linux-headers. Remove it:
sudo rm /lib/modules/$(uname -r)/build/include/linux/version.h
ERROR: The kernel header file '/usr/include/linux/include/linux/kernel.h' does not exist (...)
This will be also fixed when you install the headers package.
Related videos on Youtube
user239738
Updated on September 18, 2022Comments
-
user239738 over 1 year
I have read a lot and tried a lot - nothing worked for me.
I have a Dell Inspiron 8200 (1600x1200) with a Geforce MX440 Mobile. Installing the driver the "easy way" (
sudo apt-get install nvidia-current
) leaves me stuck with a tiny non-changeable resolution (1024x768 or 800x600). So I went for the hard way:sudo apt-get update
sudo apt-get dist-upgrade
- blacklisted the nouveau-driver
- rebooted
- downloaded and run (
sudo sh ...
) the Nvidia 96 file endingpkg1.run
which is the right one for me as I read somewhere.
This lead to an error:
ERROR: The kernel header file '/lib/modules/3.08.0-35-generic/build/include/linux/version.h' does not exist. The most likely reason for this is that the kernel source files in '/lib/modules/3.08.0-35-generic/build' have not been configured.
How can I configure the kernel source files? There is nothing like
sudo make-prepare
orsudo get-apt kernel-devel
right?A workaround suggested to copy the
version.h
(cp -v /usr/include/linux/version.h /lib/modules/$(uname -r)/build/include/linux
) which lead to this error:ERROR: If you are using a Linux 2.4 kernel, please make sure you either have configured kernel sources matching your kernel or the correct set of kernel headers installed on your system. If you are using a Linux 2.6 kernel, please make sure you have configured kernel sources matching your kernel installed on your system. If you specified a separate output directory using either the "KBUILD_OUTPUT" or the "O" KBUILD parameter, make sure to specify this directory with the SYSOUT environment variable or with the equivalent nvidia-installer command line option. Depending on where and how the kernel sources (or the kernel headers) were installed, you may need to specify their location with the SYSSRC environment variable or the equivalent nvidia-installer command line option.
Where are the kernel sources installed?
I even tried to run the
...pkg1.run
with--kernel-source-path /usr/include/linux
(where version.h and many other.h
Files are) as parameter but this lead to:ERROR: The kernel header file '/usr/include/linux/include/linux/kernel.h' does not exist (...)
Has anybody an idea?
-
jarno over 8 yearsI have linux-headers intalled in my mytbuntu 14.04.3 box and so is
linux-generic-lts-vivid
. The directory has many .h files, but notversion.h
. So maybe the problem is that the Nvidia installer is not designed to work with later kernels.