I'm trying to package a shared library using debuild to build the .deb file. In running dh_make the library option was selected. Have been following this guide Having managed to build the library, I'm getting the following error:

dh_install: mylibrary-dev missing files (usr/lib/lib*.a), aborting
make: *** [binary] Error 255
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1337:
dpkg-buildpackage -rfakeroot -D -us -uc failed

I looked inside the directory listed in the error, e.g. ~/mylibrary-1.0/debian/mylibrary-dev/usr/lib/ and it empty. The shared libraries are actually in: ~/mylibrary-1.0/debian/tmp/usr/lib/ However there are no *.a libs in there. The mylibrary-dev.install file list the following:


For some reason an extra package is listed in the control file.

Source: mylibrary
Priority: extra
Maintainer: satpal <satpal@unknown>
Build-Depends: debhelper (>= 7.0.50~), autotools-dev
Standards-Version: 3.8.4
Section: libs
Homepage: <insert the upstream URL, if relevant>

Package: mylibrary-dev
Section: libdevel
Architecture: any
Depends: mylibrary1 (= ${binary:Version})
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>

Package: mylibrary1
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>

Following the helloworld example used in the guide, it only comes up with Source and a single package

My rules file is:

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

    dh $@

closed as off-topic by Thomas Dickey, Scott, Jeff Schaller, Stephen Harris, Stephen Kitt Aug 9 '16 at 8:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Thomas Dickey, Scott, Jeff Schaller, Stephen Harris, Stephen Kitt
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Every shared library must be packaged separately, so that you can install several versions simultaneously in case you have programs that depend on them. So the control file looks normal. Your build scripts aren't building the .a file. Post your debian/rules file, and preferably a complete archive with enough source code (not your whole source, just a tiny program that compiles) and build scripts to reproduce your problem. – Gilles Aug 12 '11 at 23:19
  • You can add a link to a tarball somewhere, or (possibly better) put it on a hosting site like bitbucket or github and give the link to that. If you can't strip down your example, at least provide complete instructions on how to reproduce your error. – Faheem Mitha Aug 16 '11 at 9:01

I re-read Gilles comment on my orignal post and managed to work out why I had no .a files. It was because I had actually stopped the creation of the static library in the configure.ac with the flag:


A big D'oh on my part.

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