Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Using the instructions found here, I have been trying to create source code from a python file using debhelper. I have reached the final step, where you have to enter:

$ debuild -us -uc

However, when I enter this command, I get the output:

/usr/bin/fakeroot: debian/rules: /usr/bin/make: bad interpreter: No such file or directory
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 126

How can I get this to compile correctly?

EDIT: Here are the contents of my debian/rules file:

#!/usr/bin/make -f
    dh $@
share|improve this question
up vote 1 down vote accepted

Try reinstalling make package

if dpkg -l | grep -q '^ii\s\+make\s'; then
    sudo apt-get --reinstall install make
    sudo apt-get install make
share|improve this answer
Cheers, that fixed it. That's not a complicated code at all, is it :P – Carl Ansell Aug 24 '11 at 20:16

If you have /usr/bin/make, then there is a typo on your debian/rules, perhaps you edited it using a windows editor and saved the filed with windows carriage returns ?


dos2unix debian/rules
share|improve this answer
I created everything using Ubuntu, so unfortunately this hasn't solved the issue. How do I get /usr/bin/make, I installed everything in the tutorial and followed all the instructions and I don't seem to have one. Also, I have added the contents of my debian/rules to the original post. – Carl Ansell Aug 24 '11 at 18:41
sudo apt-get install build-essential – João Pinto Aug 24 '11 at 18:53
build-essential is already the latest version. Yet I don't have /usr/bin/make? – Carl Ansell Aug 24 '11 at 19:02
There is very odd, run: sudo apt-get install --reinstall make – João Pinto Aug 24 '11 at 20:10

I had this problem when I was builing on a filesystem that was mounted noexec.

To test this from a shell:

( echo '#!/bin/sh' ; echo echo You can run executables on this fs ) >
chmod +x

If you don't get a permission denied error, then that's not your problem. If you do, then you either need to remount the fs without the noexec option or do your work somewhere else.

share|improve this answer

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.