Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • I actually tried PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig beforehand but it didn't work. after setting PKG_CONFIG_PATH still pkg-config --variable pc_path pkg-config prints usr/local Commented Jul 17, 2014 at 13:50
  • 1
    Right -- you haven't changed the default path, but paths in $PKG_CONFIG_PATH are checked first. After you set it, you can check by calling, e.g. pkg-config --libs somepackage where "somepackage" has a .pc file in multiple places. Commented Jul 17, 2014 at 14:04
  • manpage says pkg-config retrieves information about packages from special metadata files. These files are named after the package, and has a .pc extension. On most systems, pkg-config looks in /usr/lib/pkgconfig, /usr/share/pkgconfig, /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files. It will additionally look in the colon-separated (on Windows, semicolon-separated) list of directories speci‐ fied by the PKG_CONFIG_PATH environment variable. so isn't there any way to exclude /usr/local/share/pkgconfig ? Commented Jul 17, 2014 at 14:12
  • No, but it doesn't matter if you prioritize the paths you want to prioritize. I've added an example of what I'm talking about to demonstrate that using $PKG_CONFIG_PATH works. Commented Jul 17, 2014 at 14:29
  • let me test your method again, I got library error while compiling this github.com/MaartenBaert/ssr.git I hope it works, I believe I tried your method and it didn't work Commented Jul 17, 2014 at 14:41