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
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
06-27-2010, 11:49 PM
#1
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Rep:
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
06-27-2010, 11:55 PM
#2
Guru
Registered: Sep 2009
Location: Perth
Distribution: Mint
Posts: 5,403
ummmm ... make to compile what??
1 members found this post helpful.
06-28-2010, 12:19 AM
#3
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
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?
06-28-2010, 12:24 AM
#4
Guru
Registered: Sep 2009
Location: Perth
Distribution: Mint
Posts: 5,403
Check how you are setting the KVERSION variable
1 members found this post helpful.
06-28-2010, 12:36 AM
#5
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
i am the beginer to linux,
i saw how to write a make file for module, in that he given KVERSION = $(username -r)
06-28-2010, 12:50 AM
#6
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
sorry,
it is KVERSION = $(uname -r)
06-28-2010, 01:48 AM
#7
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
anybody please help me
06-28-2010, 01:59 AM
#8
Guru
Registered: Sep 2009
Location: Perth
Distribution: Mint
Posts: 5,403
You are on the right track
The difference is that the following:
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.
06-28-2010, 03:18 AM
#9
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
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
06-28-2010, 03:21 AM
#10
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
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
06-28-2010, 03:57 AM
#11
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,308
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.
06-28-2010, 05:47 AM
#12
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
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
06-28-2010, 07:04 AM
#13
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,308
OK, then :
# yum install kernel-devel
..
1 members found this post helpful.
06-28-2010, 11:20 PM
#14
Member
Registered: Jun 2010
Location: Bangalore
Posts: 46
Original Poster
Rep:
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
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 04:03 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News