LinuxQuestions.org
Review your favorite Linux distribution.
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 06-27-2010, 11:49 PM   #1
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Rep: Reputation: 15
make: *** /lib/modules//build: No such file or directory. Stop.


Hi everyone,

I am running in fc9.while doing make i have this issue
make: *** /lib/modules//build: No such file or directory. Stop.
please help me
 
Old 06-27-2010, 11:55 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,000

Rep: Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190
ummmm ... make to compile what??
 
1 members found this post helpful.
Old 06-28-2010, 12:19 AM   #3
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
i am excuting this program,

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>

MODULE_LICENSE("Dual BSD/GPL");

static int hello_init(void) {
printk("<1> Hello world!\n");
return 0;
}

static void hello_exit(void) {
printk("<1> Bye, cruel world\n");
}

module_init(hello_init);
module_exit(hello_exit);

make file for above code is

Makefile

obj-m := hello.o
KVERSION = $(2.6.25-14.fc9.i686)

all:

make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:

make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
~




after doing make i am getting

make -C /lib/modules//build M=/home/DRAX modules
make: *** /lib/modules//build: No such file or directory. Stop.
make: *** [all] Error 2



but i checked in /lib/modules/2.6.25-14.fc9.i686/ path, build file is there, it is in red colour like this

build -> ../../../usr/src/kernels/2.6.25-14.fc9.i686

what is that mean?
 
Old 06-28-2010, 12:24 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,000

Rep: Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190
Check how you are setting the KVERSION variable
 
1 members found this post helpful.
Old 06-28-2010, 12:36 AM   #5
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
i am the beginer to linux,
i saw how to write a make file for module, in that he given KVERSION = $(username -r)
 
Old 06-28-2010, 12:50 AM   #6
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
sorry,
it is KVERSION = $(uname -r)
 
Old 06-28-2010, 01:48 AM   #7
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
anybody please help me
 
Old 06-28-2010, 01:59 AM   #8
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,000

Rep: Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190Reputation: 3190
You are on the right track

The difference is that the following:
Quote:
KVERSION = $(uname -r)
This runs the command 'uname' with the '-r' switch and returns the value to the variable KVERSION.

However, your copy in your Makefile says:
Quote:
KVERSION = $(2.6.25-14.fc9.i686)
So now it is trying to run the string "2.6.25-14.fc9.i686" and send the output to variable KVERSION, but of course a string cannot be run.

So either stick with the original call to 'uname' or simply assign the string, ie without $() around it.
 
1 members found this post helpful.
Old 06-28-2010, 03:18 AM   #9
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
but still i am getting error like this

make -C /lib/modules/2.6.25-14.fc9.i686/build M=/home/DRAX modules
make: *** /lib/modules/2.6.25-14.fc9.i686/build: No such file or directory. Stop.
make: *** [all] Error 2
 
Old 06-28-2010, 03:21 AM   #10
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
but still i am getting error like this

make -C /lib/modules/2.6.25-14.fc9.i686/build M=/home/DRAX modules
make: *** /lib/modules/2.6.25-14.fc9.i686/build: No such file or directory. Stop.
make: *** [all] Error 2
 
Old 06-28-2010, 03:57 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 3
Quote:
but i checked in /lib/modules/2.6.25-14.fc9.i686/ path,
build file is there, it is in red colour like this

build -> ../../../usr/src/kernels/2.6.25-14.fc9.i686
A link shown in red is a broken link.
I.e. a link pointing to a non existing file / directory.

Please show the output of : 'ls -l /usr/src/kernels/'

And from : rpm -qa | grep kernel
.
 
1 members found this post helpful.
Old 06-28-2010, 05:47 AM   #12
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
Please show the output of : 'ls -l /usr/src/kernels/'

And from : rpm -qa | grep kernel


1)kernels folder is not there in /usr/src

2) rpm -qa | grep kernel

kerneloops-0.10-11.fc9.i386
kernel-2.6.25-14.fc9.i686
kernel-headers-2.6.25-14.fc9.i386
 
Old 06-28-2010, 07:04 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
OK, then :

# yum install kernel-devel

..
 
2 members found this post helpful.
Old 06-28-2010, 11:20 PM   #14
boidi
Member
 
Registered: Jun 2010
Location: Bangalore
Posts: 48

Original Poster
Rep: Reputation: 15
while doing yum install kernel-devel i am getting

Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mir...ra-9&arch=i386 error was
[Errno 4] IOError: <urlopen error (110, 'Connection timed out')>
http://download.fedora.redhat.com/pu...ta/repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
 
Old 06-29-2010, 01:40 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Why in the first place use an old obsolete Linux ?
Better install Fedora 13.

Fedora 9 was moved to the old archive long time ago.
http://download.fedora.redhat.com/pu...thing/i386/os/

Old updates
http://download.fedora.redhat.com/pu...pdates/9/i386/

So you will have to use those two mirrors instead :
/etc/yum.repos.d/"new.repo"
http://forums.fedoraforum.org/showthread.php?t=221471
..

Last edited by knudfl; 06-30-2010 at 01:53 AM.
 
1 members found this post helpful.
  


Reply

Tags
make, makefile


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
/lib/modules/kernel/build file broken vaishalicoep Linux - General 2 02-04-2009 02:53 AM
/lib/module/2.6.26.6-49.fc8/build: No such file or directory white_mist Linux - Newbie 10 12-14-2008 07:52 PM
make: File not found: /lib/modules/2.6.18-elive/build/ clhona Linux - Software 3 08-08-2007 12:09 PM
[root@oprations Module]# make make -C /lib/modules/2.6.18-1.2798.fc6/build SUBDIRS=/r korotania Fedora 7 06-22-2007 03:12 PM
No build file in lib/modules/* Mlehliw Linux - Newbie 1 08-06-2004 09:40 AM

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

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