Warning: Could not link pkg-config. Unlinking... Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local You can try again using `brew link pkg-config`
pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use gcc -o test test.
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 specified by the PKG_CONFIG_PATH environment variable.
As Michael Pigg said above, in my case it was the folder permission issue. I had to do the following:
sudo chmod 777 /usr/local/bin sudo chmod 777 /usr/local/share/man/man1 brew link pkg-config
And after I'm done:
sudo chmod 755 /usr/local/bin sudo chmod 755 /usr/local/share/man/man1
to restore the original permissions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With