LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2003, 07:18 AM   #1
jeppe
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Rep: Reputation: 0
Unhappy /usr/include/linux/version.h #error ?


I want install driver but it error....I type
#make (mandrake 9.0)

gcc -D_KERNEL__ -I/usr/src/linux/include ....................

/usr/include/linux/version.h:2:2 #error
"==========================="
/usr/include/linux/version.h:2:2 #error "You should not include /usr/include/{linux,asm}/header"
/usr/........................................... #error "....................
....
(Sorry I don't save it.)
....
It installed kernel2.4.19.16mdk (#rpm -q kernel2.4.19.16mdk)
but it is not in /usr/src/linux... where is it? why do I install driver?what does the error mean? Help me pls.
thanks
jeppe
 
Old 08-18-2003, 12:19 PM   #2
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
It looks like you do not have the sources for your kernel installed on your system. Look for a package called kernel-src or linux-src in your distribution's package installation tool. (Sorry, I don't use Mandrake so I don't know what tool that is). You need the kernel sources installed to compile any drivers.

The kernel2.4.19.16mdk package you installed is probably the kernel itself, not the sources for that kernel. The sources are usually pretty large compared to the kernel itself. On RedHat, the source RPM for the kernel is around 30MB.
 
Old 08-27-2003, 09:10 PM   #3
jeppe
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Or is it the old version ? (because I found it in Linux as *.c *.h *.o)
Can I install a new kernel version (linux-2.4.20) instead the old ?
Will it fine ? And you help me to how installation ? (./configure --?=?,make , make install and anyelse)
 
Old 08-28-2003, 08:39 AM   #4
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
You can certainly install sources for a newer kernel than the one you are running, then build and install it, and add it to your boot-loader's configuration so that you can choose the new or old kernel when you boot. There's lot's of docs around on building and installing the kernel. You don't use ./configure because this isn't a GNU package. It has it's own configuration and install process. I like the interactive configuration.

The best place to start is probably the Kernel HOWTO: http://www.tldp.org/HOWTO/Kernel-HOWTO/index.html. Or search the web for "linux and building the kernel and mandrake" or something like that. I found a short summary at: http://www.mandrakeuser.org/docs/install/kupgrade2.html
 
Old 08-29-2003, 02:07 AM   #5
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
Forgive me for hijacking your thread but we seem to have the same problem so I thought that there was no point in starting a new one. My problem is that I am trying to install a driver for my Aztech 56k USB Modem. I have downloaded a tar.gz driver from the official website.

Links have been deleted as indeed it is the same problem. Solved by installing the required files.

Last edited by Jongi; 09-04-2003 at 06:11 AM.
 
Old 08-29-2003, 08:24 AM   #6
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
Jongi, you do have the same problem: you don't have the sources for the kernel on your system. To compile kernel modules, you must have the kernel's include files available. These are not installed by default on most distributions, you must locate the kernel source package and install it. Then you'll be able to compiler your driver.
 
Old 09-01-2003, 01:15 AM   #7
jeppe
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Original Poster
Rep: Reputation: 0
It involve with kernel source.
thanks all
jeppe
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
VMware and /usr/src/linux/include neraka Linux - Newbie 6 03-21-2009 09:01 PM
problem in /usr/include/linux/timer.h santhosh.linux Linux - Software 0 12-01-2005 10:49 PM
/usr/include/linux revsteban Debian 1 02-22-2005 10:41 PM
/usr/include/linux contains? alaios Linux - General 4 11-11-2004 10:34 PM
Linux: Problems with pow() from /usr/include/tgmath.h jimmy416 Programming 1 10-13-2003 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:51 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