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 a beginner in the Linux world and I'm trying to figure out how to run the make command. I'm trying to make use of fmem (a tool found on the internet), and it is said that "make" must be run from a terminal in the folder.

However I get this:

root@bakie:/home/tux/Documents/fmem/fmem_1.6-0# make
rm -f *.o *.ko *.mod.c Module.symvers Module.markers modules.order \.*.o.cmd \.*.ko.cmd \.*.o.d
rm -rf \.tmp_versions
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
make: *** /lib/modules/3.10-3-686-pae/build: No such file or directory.  Stop.
make: *** [fmem] Error 2

Thanks for making me see clearer.

share|improve this question
Did you edit or just copy/paste the make output? It's inconsistent, and the makefile would have errors in it if that's a plain copy/paste. – Mat Mar 16 '14 at 9:35
No copy . I install fmem package. It need to compile # make # ./run.sh so I did the make command and then I got this error. I used Kali.please help me – bakie Mar 16 '14 at 9:45
The piece of output you placed in your question is inconsistent. Quotes aren't right, output doesn't match the command that precedes it. Did you actually copy/paste those lines from your console or did you re-type some of it? If you retyped, please edit your question and copy/paste them without retyping anything. – Mat Mar 16 '14 at 9:47
I edit my post, Thanks for appointment.please help me. – bakie Mar 16 '14 at 9:51
You might be missing some packages. What distribution are you using? (Debian, Ubuntu, something else?) – Mat Mar 16 '14 at 9:54
up vote 0 down vote accepted

You're missing the Linux kernel's headers. You can install them like so:

$ sudo apt-get install linux-headers-$(uname -r)

Any time you're attempting to compile C/C++ software you often need libraries and header files. The header files can contain function prototypes and implementations of said functions. The libraries are binary blob files that contain compiled code that the compile can incorporate when told to do so by your source code.

The big clue to this stuff missing is this line in your output:

make: * /lib/modules/3.10-3-686-pae/build: No such file or directory. Stop.

This is telling you that a library is missing, and anytime you see "modules" missing that's a good indicator that it's something to do with the Linux kernel.

share|improve this answer
How can i make not to miss that 'modules' ? thanks – bakie Mar 16 '14 at 14:21
@bakie - you won't be able to, the command above it is making use of this directory and requires the contents in there to be present. – slm Mar 16 '14 at 14:26

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.