1

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 $@

3 Answers 3

1

Try reinstalling make package

if dpkg -l | grep -q '^ii\s\+make\s'; then
    sudo apt-get --reinstall install make
else
    sudo apt-get install make
fi
1
  • Cheers, that fixed it. That's not a complicated code at all, is it :P Aug 24, 2011 at 20:16
0

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 ?

Try:

dos2unix debian/rules
4
  • 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. Aug 24, 2011 at 18:41
  • sudo apt-get install build-essential Aug 24, 2011 at 18:53
  • build-essential is already the latest version. Yet I don't have /usr/bin/make? Aug 24, 2011 at 19:02
  • There is very odd, run: sudo apt-get install --reinstall make Aug 24, 2011 at 20:10
0

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 ) > t.sh
chmod +x t.sh
./t.sh

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .