Error when compiling webcam driver

I’m running Suse 11.2 32bit with KDE 4.3.1 “release 6”

When I start compiling my webcam driver I get the following error:

make -C /lib/modules/ M=/home/gila/Download/ov51x-jpeg-1.5.9 modules
make: *** /lib/modules/ No such file or directory. Stop.
make: *** [all] Error 2

I have the kernel-headers and kernel-source installed. But I did notice that I have the kernel-headers show up with version 2.6.31-3.4. Does that matter?
Thanks in advance.

Yes, the kernel version does matter. You do not want to downgrade your kernel unless you know what you are doing and have a darned good reason for it.

Thanks for your quick reply.
So what do I do then? Uninstall the headers? Because this version (2.6.31-3.4) is the only one I’m being offered in yast.

Ok, I uninstalled the headers, but no difference. The folders/files the message says it can’t find do exist. What do I do?

are you sure the ‘build’ directory is there in /lib/modules/…?

Can you post output of ‘uname -a’
and of 'rpm -qa | grep kernel- ’


here are the outputs

gila@cellar:~> uname -a
Linux cellar #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 i686 athlon i386 GNU/Linux
gila@cellar:~> rpm -qa | grep kernel-

I double-checked. the path looks as follows:


Thanks for your help.

As you can see, I since installed kernel-syms. Now when I type “make” it can’t find gcc. I had to uninstall that, when I uninstalled the kernel-headers. If I go to re-install gcc it wants to put the wrong version kernel-headers back in. :frowning:

@von_shtupp: Did You solve this? I want to compile the newest gspca drivers and I’ve got similar error:

mateusz2@cmxpc:/home/mateusz/WebCam/gspca-182b5f8fa160> LANG=en_EN make
make -C /home/mateusz/WebCam/gspca-182b5f8fa160/v4l
make[1]: Entering directory `/home/mateusz/WebCam/gspca-182b5f8fa160/v4l'
Updating/Creating .config
Preparing to compile for kernel version 2.6.31
File not found: /lib/modules/ at ./scripts/ line 32, <IN> line 4.
make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'.  Stop.
make[1]: Leaving directory `/home/mateusz/WebCam/gspca-182b5f8fa160/v4l'
make: *** [all] Error 2

The problem is that /lib/modules/ point to linux-obj:

lrwxrwxrwx 1 root root 44 11-14 19:32 /lib/modules/ -> /usr/src/linux-

but linux-*-obj not exists. I read that this folder is generated during the kernel compilation. What can i do with this?

Hello coolmax,

so far I have not been able to solve this. And to be honest, I know next to nothing about compiling, so I’m the wrong person to ask really.Sorry about not being able to help you. :frowning: