1. When installing a library with configure, make and make install, does make install copy <libraryname>.pc to some place?

    • If yes: Where is it?
    • If no: Should we copy it somewhere rather than leave them where they are?
  2. I am asking that, because on an old notebook of mine, I saw:

    add the directory containing libraryname.pc to the PKG_CONFIG_PATH environment variable, so that pkg-config --clags libraryname and pkg-config --libs libraryname can find them.

  3. Will dpkg -l be able to track the installed library depending on whether it's path was added to PKG_CONFIG_PATH?

  4. Once I copy <libraryname>.pc to some place, will dpkg -l be able to track the installed packages?

  • Please don't combine multiple questions in a single post. dpkg has nothing to do with packages you install manually from source.
    – terdon
    Commented Jul 9, 2014 at 18:00
  • Also where on your old note(book) did you see the quote?
    – polym
    Commented Jul 9, 2014 at 20:35

1 Answer 1


In general, ./configure && make && make install without any parameters sticks everything under /usr/local, which would place foo.pc in /usr/local/lib/pkgconfig/foo.pc

To make use of this, you'd need to do basically PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags foo, or, compile in this manner:

./configure --prefix=/usr #places built binaries under /usr instead of /usr/local
make install

Now the foo.pc file will be where its expected.

Note: This places stuff in system folders, so realize you can overwrite important things if you're not careful.

And to answer regarding the dpkg question, no. Package managers can only track files installed by them. Now, if you're feeling adventureous, you can write up the files needed to wrap the standard ./configure && make && make install buils process to produce a dpkg installable deb package, which would be tracked :)

Its been some time since I last made a debian package, a few years, and to be honest I rather hated the process, so don't expect info from me on that front. I've since switched to archlinux and writing PKGBUILDs (scripts that build arch packages using makepkg) is quite a simple task :)

You must log in to answer this question.

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