LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-19-2003, 06:30 PM   #1
kiltie
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian
Posts: 17

Rep: Reputation: 0
modversions.h - where do I find this?


Hi,

I have an Nforce2 motherboard, and have downloaded the official Nvidia src.rpm to make the modules for network and audio.

Folowing the instructions (#rpm --rebuild NVIDIA_nforce-1.0-0261.src.rpm) I get an error:

modversions.h: no such file or directory

and the build stops. Looking around a little tells me that I need the kernel source (2.4.18-bf2.4). Is there a way to obtain and install this without having to jigdo the whole woody source CD set?

Bear in mind that

a) I can't use any of the linux tools like apt to get this as the network adapter doesn't work under linux.

b) I'm a Linux newb at the moment and need baby-talk instructions

Thanks,

kiltie.
 
Old 10-19-2003, 09:43 PM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Yes. You can install the kernel headers package for that kernel. Just do an apt-get install kernel-headers-2.4.18-bf2.4.
 
Old 10-20-2003, 02:15 AM   #3
kiltie
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks, the apt-get worked, but it didn't install any file called modversions.h so rpm still falls over.

Any ideas what I should try next?
 
Old 10-20-2003, 03:40 AM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally posted by kiltie
Thanks, the apt-get worked, but it didn't install any file called modversions.h so rpm still falls over.

Any ideas what I should try next?
Did you change to /usr/src/ and ln -s kernel-headers-2.4.18-bf2.4 linux to link the headers properly so it will know where they are?
 
Old 10-20-2003, 04:26 AM   #5
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Are you sure? Did you do a find / -iname mod*.h?

Last edited by adz; 10-20-2003 at 04:41 AM.
 
Old 10-20-2003, 05:59 AM   #6
kiltie
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by HappyTux
Did you change to /usr/src/ and ln -s kernel-headers-2.4.18-bf2.4 linux to link the headers properly so it will know where they are?
Umm. No I didn't as I didn't know I had to do that.


Quote:
Originally posted by adz
Are you sure? Did you do a find / -iname mod*.h?
No, but I looked in /usr/src/linux for modversions.h which is where the error message said it was loking.

I'll try both these things when I get home tonight.


Thanks
 
Old 10-20-2003, 06:46 AM   #7
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Yeah the kernel headers don't get installed there by default. You have to make a symlink. You do that with the command ln -s <target> <symlink name>. For example, if I wanted to make a symlink from "/adz" to "/home/adz" I would type from the "/" directory ln -s /home/adz adz. Then, from the "/" directory I could type cd adz and it would take me straight to my home directory.
 
Old 10-20-2003, 11:36 AM   #8
kiltie
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Well I'm getting there slowly, but there seems to be another tripwire at every turn.

I managed the rpm --rebuild instruction, which created a file /usr/src/rpm/RPMS/i386/NVIDIA_nforce-1.0-0261.i386.rpm but when I try the next instruction I get the following errors:

/usr/src/rpm/RPMS/i386# rpm -i NVIDIA_nforce-1.0-0261.i386.rpm
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm

Checking, I see that there isn't an rpm directory in /var/lib.

What am I doing wrong this time? :/

(/me bangs head against wall)
 
Old 10-20-2003, 11:59 AM   #9
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Why are you using rpm on debian??? I was wondering about this earlier but go distracted by the other stuff. Don't try to install the nvidia driver by rpm. It is possible to do on debian but not recommended. Get the self-installer directly from nvidia and follow their instructions. Once you've got the kernel headers symlinked properly, it's a breeze. Oh and if you haven't already, get gcc-2.95. If you're using testing then it's very likely that you're using gcc-3.3. You can have both at the same time but make sure you have 2.95 and the /usr/bin/gcc symlink points to gcc-2.95. Stuff can come out buggy if you're using 3.3.
 
Old 10-20-2003, 12:37 PM   #10
kiltie
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Now you have me confused. The download page (www.nvidia.com/object/linux_nforce_1.0-0261) only has rpm's on it. I can't see any mention of a self-installer.

And what is gcc?

Sorry to keep on asking these questions but I'm starting to get a bit disillusioned.
 
Old 10-20-2003, 08:40 PM   #11
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Try this address: http://www.nvidia.com/object/linux_d..._1.0-4496.html

Gcc is the GNU C Compiler. It's the cornerstone of any linux distro really. Type apt-get install gcc-2.95. Then (after download and setup of gcc is finished) go to /usr/bin and type ls -l gcc. If the gcc symlink points to gcc-3.3 (or anything other than gcc-2.95) then type rm gcc. Then ln -s gcc-2.95 gcc. Do the same for cpp and g++ if you have them.

Edit: You mentioned you don't have a working network adapter. You can use the Debian CDs as an apt source. Also, what network adapter to you have. Most if not all work fine under linux.

Last edited by adz; 10-20-2003 at 08:44 PM.
 
Old 10-20-2003, 09:59 PM   #12
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally posted by kiltie
Now you have me confused. The download page (www.nvidia.com/object/linux_nforce_1.0-0261) only has rpm's on it. I can't see any mention of a self-installer.

And what is gcc?

Sorry to keep on asking these questions but I'm starting to get a bit disillusioned.
You have the wrong package you want the linux_nforce_1.0-0261.tar.gz available on the page you mention. Then according to the instructions on this page in the Tar File Installation section you want to from the directory you downloaded or moved the file to:

Code:
example% tar -xvzf nforce.tgz        
example% cd nforce                      
example% make                          
example% su
Password: ******
example# make install
Then the drivers will be compiled and installed. You will want to check which gcc compiled your kernel to do this dmesg | less in a console window will give you output similar to this:
Code:
Linux version 2.4.22.031019 (root@HappyTux) (gcc version 2.95.4 20011002 (Debian prerelease)) #1 Sun Oct 19 23:10:17 ADT
As the first line this tells me that my kernel version is 2.4.22.031019 compiled with gcc 2.95.4 yesterday evening. You should use what ever version of gcc compiled the kernel you are using and it most likely be the same as mine so check the symbolic link with ls -l /usr/bin/gcc and you should see this:
Code:
[11:33 PM Mon Oct 20: stephen @ ~]
>$ ls -l /usr/bin/gcc
lrwxrwxrwx    1 root     root            8 2003-09-01 02:24 /usr/bin/gcc -> gcc-2.95
If it looks like this then you can just compile otherwise check to see if gcc-2.95 is installed with ls /usr/bin/gcc-2.95 if it is there then you would before you start compiling the drivers export CC=/usr/bin/gcc-2.95 to set the compiler for the shell you are in to gcc-2.95 then compile. If gcc-2.95 is not installed see if you have a version available with apt:
Code:
 [11:34 PM Mon Oct 20: stephen @ ~]
>$ apt-cache policy gcc
gcc:
  Installed: 2:2.95.4-14
  Candidate: 4:3.3.1-2
  Version Table:
     4:3.3.1-2 0
        990 http://ftp2.de.debian.org testing/main Packages
        500 http://ftp2.de.debian.org unstable/main Packages
 *** 2:2.95.4-14 0
        500 http://ftp2.de.debian.org stable/main Packages
        100 /var/lib/dpkg/status
As you can see you have to have stable sources to get 2.95 so you would apt-get install gcc/stable to install the version you would need.

In the nvidia page I linked above it also tells you in the What the Package Does section that when using the tar file to install it does not make any changes to the configuration files so you would have to edit the file /etc/modutils/aliases and add the required lines for the hardware to work you should add lines similar to these to the bottom of the file:
Code:
## Added by me for Nvidia netcard
alias eth0 nvnet 

## Added by me for Nvidia audio
alias sound-slot-0 nvaudio 

## Added by me for Nvidia USB
alias usb-interface usb-ohci
You would only add the lines for the devices that you will be using and after having changed the file and saved it you should run update-modules to update the modules.conf so the changes will be seen on the next re-boot these steps would be done as root.

Your Nvidia devices should work on the next re-boot, hopefully I have not left anything out or made the directions too confusing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling: can't find modversions.h rickthemick Debian 3 11-18-2004 01:32 AM
Problem with modversions.h Roger Almenar Linux - Hardware 0 07-21-2004 04:22 PM
modversions.h JanDeMan Linux - Newbie 3 06-14-2004 06:48 AM
can't find modversions.h talonnb Linux - Newbie 2 08-03-2003 04:43 AM
modversions.h not there closet geek Linux - Software 4 06-02-2003 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration