I ran into this error when doing a pecl install imagick
on a Mac.
$ pecl install imagick [...] checking for pkg-config... no pkg-config not found configure: error: Please reinstall the pkg-config distribution ERROR: `/private/tmp/pear/temp/imagick/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-imagick' failed
By default, the needed pkg-config
binary isn’t installed. You can install it via Homebrew.
$ brew instal pkg-config ==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.catalina.bottle.1.tar.gz ==> Downloading from https://akamai.bintray.com/c0/c0a6927c8e404f6db8b14d6644a218b22ddb0d27be1fa0a69d15bf0d9a6875ae?__gda__=exp=1571254410~hmac=2e306f9876b2de0ae458dcbf1e05bc609777305eb8ad5e25125e9467e8bfcfeb&response-content-disposition= ######################################################################## 100.0% ==> Pouring pkg-config-0.29.2.catalina.bottle.1.tar.gz 🍺 /usr/local/Cellar/pkg-config/0.29.2: 11 files, 623KB
And you’re all set!