错误:找不到PkgConfig(丢失:PKG_CONFIG_EXECUTABLE) [英] Error:Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)

查看:4211
本文介绍了错误:找不到PkgConfig(丢失:PKG_CONFIG_EXECUTABLE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用点云库1.5.1。当我运行CMake 3.4.0-rc2生成项目时,它出现错误:

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)

如何解决此错误?

推荐答案

由于 pkg-config 实用程序在您的系统上不可用。

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

使用 PkgConfig 并不是真正的跨平台解决方案,因为Windows并未安装 pkg-config 实用程序。 (PCL开发人员应该在其CMake中使用 find_package()。也许,这值得在Github上打开错误报告。)在Linux上,这很容易解决;您可以像这样安装 pkg-config

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

但是,在Windows上,该过程涉及更多。在Windows的此处中,有几种解决方案可用于在Windows上安装 pkg-config 。 。我不确定哪个最适合您的情况,因此建议您仔细阅读其中的一些内容。在Windows计算机上成功安装 pkg-config 实用程序后,清除CMake缓存,然后重新运行CMake。这样可以消除错误,并允许您进行构建。

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.

这篇关于错误:找不到PkgConfig(丢失:PKG_CONFIG_EXECUTABLE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆