I am running a raspberry pi 3B (V 1.2). I am using the proprietary OpenGLES driver (Broadcom). I have just run a full apt upgrade.

I am trying to build SDL2 and I noticed that while it was being configured that the brcm_host packages weren't being found. I looked around and found that the appropriate .pc files are found in /opt/vc/lib/pkgconfig, but when I run pkg-config --list-all the packages aren't found. I have looked around to see what might be going on and have seen some answers regarding setting the PKG_CONFIG_PATH, which doesn't seem to be set on my system. Is there a way to reset the paths that pkg-config looks in for .pc files?

To try and fix this I have tried to reinstall the raspberrypi-dev packages (sudo apt install --reinstall libraspberrypi-dev libraspberrypi0) and the package-config package (sudo apt install pkg-config --reinstall pkg-config, but this hasn't fixed the problem.


  • See the environment variables section in linux.die.net/man/1/pkg-config.
    – tttapa
    Aug 21, 2021 at 1:59
  • Thanks for having a look at this! I see that I can set the PKG_CONFIG_PATH environment variable to add custom paths, but I was assuming that there would be a system-wide solution integrated with the deb packages that provide the .pc files.
    – Tim B
    Aug 30, 2021 at 23:46

1 Answer 1


As pointed out in the comment by @tttapa, the best solution to my problem here is to add the directory containing the package config files using the PKG_CONFIG_PATH environment variable. I added this to my .profile file and it has worked well for me.

I think that this is the best solution, because I see now that adding them by default could mess up switching between the different OpenGL implementations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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