How Do You Deal with An “hwloc library not found” Error?

Problem scenario
You are trying to install Snort on Ubuntu.  You have installed hwloc (because you know the command hwloc-info works).  But when you try to run a configure script (e.g.,, you get this error:

"-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
CMake Error at cmake/FindHWLOC.cmake:6 (message):

        ERROR! hwloc library not found.

        Get it from

Call Stack (most recent call first):
  cmake/include_libraries.cmake:6 (find_package)
  CMakeLists.txt:18 (include)"

How do you troubleshoot this "Could not find PkgConfig: Missing:" error?

Install several packages with the following command:

sudo apt-get -y install libxext-dev libpng-dev libimlib2-dev libglew-dev libxrender-dev libxrandr-dev libglm-dev

# If one or two of the above is not found, do not be alarmed.  The above command may still solve the problem.

Join the Conversation

1 Comment

Leave a comment

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