Pkg-config script could not be found

Bob Dole picture Bob Dole · Apr 24, 2014 · Viewed 8k times · Source

I am trying to install some software, but I keep receiving the error:

configure: error: The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

I just installed the brew command, and tried to use it to install pkg-config. It says that it is already installed.

I made sure that it is in the path via export PATH=$PATH:/usr/bin/pkg-config.

Also, trying to install glib, it says I am missing libfft. I used brew install libfft to install this missing package. However, I still get a message stating that it is not there. This is a new mac, so perhaps things are not going in the proper directories?

Any help would be appreciated, as I am beyond lost.

Answer

Steven R. Loomis picture Steven R. Loomis · Jul 15, 2014

I don't know what formula you are trying to install, but the real problem may be that whatever you are trying to install isn't marked as "depending on" pkg-config. It may need this line:

depends_on "pkg-config" => :build