"error: pkg-config not found" CentOS 7

I want to install PDlib for PHP but I get the error: error: pkg-config not found

I got a empty warning in the folder when I entered into the pkg-config folder.

[root@server ~]# cd pdlib
[root@server pdlib]# phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
[root@server pdlib]# ./configure --enable-debug
checking  ..
~~
~~
checking for pkg-config... configure: error: pkg-config not found

Path:

[root@server]# which pkg-config
/usr/local/bin/pkg-config

Folder check:

[root@server pdlib]# cd /usr/local/bin/pkg-config
-bash: cd: /usr/local/bin/pkg-config: Not a directory
[root@server ~]# whereis pkg-config
pkg-config: /usr/bin/pkg-config /usr/local/bin/pkg-config /usr/share/man/man1/pkg-config.1.gz

/usr/bin/pkg-config => Directory /usr/bin/pkg-config: no such file or directory
/usr/local/bin/pkg-config => Directory /usr/bin/pkg-config: no such file or directory
/usr/share/man/man1/pkg-config.1.gz => Yes available

How do I fix this?


I’m trying to install the Face Recognition plugin for the Nextcloud software on CentOS 7 - PHP 7.1.27

The page I get help to install PHP Module - Link