-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Apr 01, 2016 at 09:07:55PM +0300, Aleksandar Valchev wrote: > Hi *, > > is there any library for using apt-get via C++ ? > > I'm aware of "system" and boost python interface, but just in case to ask... > > Thanks a lot.
If you do ldd $(which apt-get) you get linux-vdso.so.1 (0x00007ffd75738000) libapt-pkg.so.4.12 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12 (0x00007fb270794000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fb270591000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb270215000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb26ff10000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb26fcfa000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb26f955000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb26f751000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb26f536000) libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fb26f325000) /lib64/ld-linux-x86-64.so.2 (0x0000559ad694c000) so there's a libapt-pkg. So you can install the corresponding -dev package (don't forget the -doc): sudo apt-get install libapt-pkg-dev libapt-pkg-doc The docs should be now in /usr/share/doc/libapt-pkg-doc. Enjoy :-) regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlb+yYAACgkQBcgs9XrR2kbz9ACdGi31zT7iwz8FAShHyc6VwZu5 GVwAn3NCF0kHQUY1cqRmozwJk/7UPZoI =7n0A -----END PGP SIGNATURE-----