How Do You Fix the Error “The pkg-config script could not be found or is too old.”

Problem scenario
You run a command like "make deps", but you get this message "configure: error: The pkg-config script could not be found or is too old." What should you do?

Solution
For an Ubuntu/Debian distribution of Linux, run:

sudo apt-get install -y pkg-config

For a Red Hat distribution of Linux (e.g., CentOS/RHEL/Fedora), run this:

sudo yum install -y pkgconfig

For Archlinux OS, run this:

sudo pacman -S pkgconf

These solutions were adapted from https://stackoverflow.com/questions/23202146/cannot-find-pkg-config-error

Leave a comment

Your email address will not be published. Required fields are marked *