Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to linux as of yesterday. I'm using linux puppy to try to get the most out of a 10 year old, slow laptop. I installed it fine, no problems there, but as soon as I try to use my usb dongle's install CD, the problems start.

The CD included support for linux as well as windows, so I copied the linux files off the CD and, through the console, ran the install.sh file to easy install the driver. All seemed to be going well until... I get the following error:

make: *** /lib/modules/ No such file or directory. Stop.

and then displays an Error 2 message.

This is the only web-result I could find with any information on it but I don't understand how I should correct this: http://murga-linux.com/puppy/viewtopic.php?t=76975 (something about missing kernel header files).

I must stress, I only have limited experience in C and even less in C++.

Could anybody suggest a fix?

I have already tried using the windows .inf driver information file with the ndiswrapper utility that came with the network setup wizard. This detects my wireless network but does not connect. Maybe I'm just configuring it wrongly but I don't think so?

Any ideas?

share|improve this question
When building a driver, you need to get the source of the running kernel, which may either be downloaded on kernel.org or by your package manager (read the doc and use a search engine). Don't touch anything, just put the files where they oughta be (that is, extracting or installing the sources the right way). – Aki Apr 20 '12 at 17:16
@Aki Ok, I have downloaded the kernel I am running (linux as a tar.gz archive, which I have extracted and have searched for files/directories named "build" but search returns nothing? – user1083734 Apr 20 '12 at 18:08
Am unable to find file or directory titled "build" – user1083734 Apr 20 '12 at 20:59
Does anybody know how to solve this? – user1083734 Apr 21 '12 at 12:09
up vote 4 down vote accepted

You need to install kernel headers to compile a module. The kernel headers are not part of the kernel source (or at least not all of them are), they are generated when the kernel is compiled, and some of these headers depend on compilation options.

There is an unofficial kernel header package. If you prefer to do things yourself, compile your own kernel.

Once you have the kernel headers, /lib/modules/ must be a symbolic link to the directory that contains the include and arch diretories with the headers, as well as the Module.symvers file containing the kernel's symbol table. For example:

ln -s /usr/src/linux- /lib/modules/
share|improve this answer
thanks, i will try in the morning – user1083734 Apr 22 '12 at 4:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.