Search code examples
clinuxunixdebiandpkg

dpkg commands in C


How do I use dpkg commands in C? What headers/commands are available?

I tried a web search, but it mostly displays manpages for dpkg, and I don't see the said manpage mention anything C-related.


Solution

  • Unfortunately for you, dpkg provides a much better api for Perl or Ruby than for C. The package you want is libdpkg-dev, which provides the static library libdpkg.a. However, be warned that this library is volatile and intended for internal use only by the dpkg binary. Use at your own risk ;)