Error:Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

倖福魔咒の 提交于 2020-08-05 05:24:32

问题


I am using Point cloud library 1.5.1. When I run CMake 3.4.0-rc2 to build my project, it has error:

Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

How do I fix this error?


回答1:


This error is raised because the pkg-config utility is not available on your system.

Using PkgConfig with CMake is not a truly cross-platform solution, as Windows does not come with the pkg-config utility installed. (The PCL developers should instead use find_package() in their CMake. Perhaps, this is worth opening up a bug report on their Github.) On Linux, this is an easy fix; you can install pkg-config like this:

sudo apt-get install pkg-config

However, on Windows, the process is more involved. There are several solutions for installing pkg-config on Windows documented here. I'm not sure which most directly applies to your situation, so I suggest reading through some of those. After successfully installing the pkg-config utility on your Windows machine, clear your CMake cache, and re-run CMake. This should remove the error, and allow your build to proceed.



来源:https://stackoverflow.com/questions/33380020/errorcould-not-find-pkgconfig-missing-pkg-config-executable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!