I have created a debian source package for my java swing app that has .jar file and two lib/jar files. Three files (.dsc, .orig.tar.xz, debian.tar.gz) were generated as part of the debian source package. When I create the .deb file using:

dpkg-buildpackage -rfakeroot -uc -b

it gives the following error in install file:

cp: cannot stat debian/tmp/abc-1.0/xyz.jar: No such file or directory dh_install: cp -a debian/tmp/abc-1.0/abc.jar debian/aspose/aspose-1.0/ returned code 1 make dpkg-buildpackage: error: fakeroot debian/rules binary gave error status 2

Contents of install file:


Following are the contents of my rules file:

#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

    dh $@ 

How can I solve this?

  • Please add the output of cat debian/*install. – muru Feb 4 '15 at 9:50
  • I have updated the question. Please answer. – Imdad Soomro Feb 4 '15 at 16:40
  • Following is the error coming when i run the command: sudo dpkg-buildpackage -rfakeroot -uc -b cp: cannot stat ‘debian/tmp/aspose-1.0/Aspose.Examples.Launcher.jar’: No such file or directory dh_install: cp -a debian/tmp/aspose-1.0/Aspose.Examples.Launcher.jar debian/aspose//aspose-1.0/ returned exit code 1 make: *** [binary] Error 2 – Imdad Soomro Feb 6 '15 at 9:50

Ok,I think that you have not created debian folder. The files which are install, rules and so on in debian folder are very important for creating deb package. So you should read debian official manual to learn how to do it. As you said, you should generate a install file for installing .jar file. Good luck.

| improve this answer | |
  • I have updated the question. Please answer. – Imdad Soomro Feb 4 '15 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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