LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Nvidia Driver can't find kernel source (https://www.linuxquestions.org/questions/fedora-35/nvidia-driver-can%27t-find-kernel-source-168223/)

Forezt 04-09-2004 02:15 PM

Nvidia Driver can't find kernel source
 
I was trying to install the Nvidia driver on my computer using these instructions, but when I got into the installer and accepted the agreement, it said that it couldn't find a "precompiled kernel interface". I installed the kernel sources for my kernel. Could it be that it is looking in the wrong path? if so, how do I change the path it is looking in?

here is my nvidia-installer.log:



Code:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Fri Apr  9 14:05:08 2004

option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : false
  uninstall              : false
  driver info            : false
  no precompiled interface: false
  no ncurses color        : false
  query latest driver ver : false
  OpenGL header files    : false
  no questions            : false
  silent                  : false
  XFree86 install prefix  : /usr/X11R6
  OpenGL install prefix  : /usr
  Installer install prefix: /usr
  kernel source path      : (not specified)
  kernel install path    : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp site                : ftp://download.nvidia.com

Using: nvidia-installer ncurses user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
  ke the installer to attempt to download a kernel interface for your kernel f
  rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
  this means that the installer will need to compile a kernel interface for
  your kernel.
ERROR: Unable to find the kernel source tree for the currently running kernel.
      Please make sure you have installed the kernel source files for your
      kernel; on Red Hat Linux systems, for example, be sure you have the
      'kernel-source' rpm installed.  If you know the correct kernel source
      files are installed, you may specify the kernel source path with the
      '--kernel-source-path' commandline option.
ERROR: Installation has failed.  Please see the file
      '/var/log/nvidia-installer.log' for details.  You may find suggestions
      on fixing installation problems in the README available on the Linux
      driver download page at www.nvidia.com.


meldar 04-09-2004 03:29 PM

You kernel sources are probably installed in /usr/src/linux-<kernel-version>.
Creating a symbolic link to i called linux should solve it, e.g:

/usr/src$ ln -s linux-2.6.3 linux

Forezt 04-10-2004 12:46 PM

I did that just now and I'm still getting the same error. Is there some sort of way to tell it where the source code is? :confused:

I'm pretty sure I got the right source for my kernal, but I could double check.

gbhuvanesh 04-13-2004 08:49 AM

nvidia driver installation problems
 
i have installed pcq linux 2004 which is a linux distro based on fedora 1.
i tried to install nvidia video drivers but i got the error message that a pre compiled kernel interface was not found.please help

LordMorgul 04-13-2004 05:49 PM

The precompiled interface is not a problem, simply following the prompt and let the installer compile one for your system (you will need to have the kernel sources installed).

As for the above issue with the kernel sources...
The typical sources setup for Fedora (Red Hat as well, naturally) is to have the sources installed to /usr/src/linux-<kernelversion> (where the <kernelversion> part would be replaced by the output of uname -r). The symlink mentioned (/usr/src/linux) should be there but is not crucial. The one that is crucial is found in the /lib/modules directory for the running (or compilation target) kernel.
You should find that the 'target' of the symlink /lib/modules/<kernelversion>/build points to the correct kernel sources tree, in this case /usr/src/linux-<kernelversion>.

As a specific example:
/lib/modules/2.6.4-1.305/build -> /usr/src/linux-2.6.4-1.305

The kernel-source rpm should have taken care of this for you.. so it is possible you have the wrong source rpm installed. What is the output (the complete output) of rpm -q kernel kernel-source?

Forezt 04-18-2004 02:27 PM

kernel-2.4.22-1.2115.nptl
kernel-2.4.22-1.2174.nptl
kernel-source-2.4.22-1.2174.nptl_37.rhfc1.at

I am using kernel-2.4.22-1.2115.nptl I think. That's the option I select at startup in GRUB.

LordMorgul 04-18-2004 03:44 PM

Quote:

Originally posted by Forezt

kernel-2.4.22-1.2174.nptl
kernel-source-2.4.22-1.2174.nptl_37.rhfc1.at

This is the wrong source rpm for the 2174 kernel, it is distributed from the ATRPMS repository, and although it might have the correct sourcecode.. it still is not the correct matching (and official) source.
If you wish to use this kernel you should remove that kernel source (rpm -e kernel-source) then download and install: http://mirrors.kernel.org/fedora.us/....nptl.i386.rpm

If you are running the 2115 kernel, then you will have to install the 2115 kernel-source before the driver can compile for it, these have to match precisely, having one kernel-source is not good enough.
Download and install: http://mirrors.kernel.org/fedora.us/....nptl.i386.rpm

It would be better to install the latest kernel than to use either of these old kernels... they are updated for a reason.
http://mirrors.kernel.org/fedora.us/....nptl.i386.rpm
for i686 processor: http://mirrors.kernel.org/fedora.us/....nptl.i686.rpm
for athlon processor: http://mirrors.kernel.org/fedora.us/...ptl.athlon.rpm

Gunnyman 04-20-2004 05:54 AM

otoh Livna is back up with a mirror and you can use yum to get a pre-compiled nvidia rpm for your kernel version.
See http://livna.cat.pdx.edu/ for info.

Forezt 04-20-2004 04:52 PM

When I try to remove my current kernel-source package, it says:

Code:

[root@localhost root]# rpm -e kernel-source
warning: cannot get shared lock on /var/lib/rpm/Packages


LordMorgul 04-20-2004 07:35 PM

This is an indication that you have another rpm process running (or yum / apt, which are using librpm). If you do not.. and you are certain of this then you may need to remove old, stale, lock files in /var/lock/rpm.


All times are GMT -5. The time now is 04:49 PM.