CMake Error: CMake was unable to find a build program corresponding to "Ninja".
系统环境:
$ lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.8 (Final)
Release: 6.8
Codename: Final
$ getconf LONG_BIT $ which cmake
/usr/bin/cmake
$ cmake --version
cmake version 2.8.12.2
$ which ninja
/usr/bin/ninja
$ ninja --version
1.7.
问题:使用cmake工具且选用Ninja作为编译工具(build program)时,报错,找不到Ninja的程序,具体信息如下:
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: /home/jgeng/avs2-build/CMakeFiles/2.8.12.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: /home/jgeng/avs2-build/CMakeFiles/2.8.12.2/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!
解决方法:
# ln -s /usr/bin/ninja /usr/bin/ninja-build
# strace cmake -GNinja .. | grep -i ninja
access("ninja-build", R_OK) = - ENOENT (No such file or directory)
access("/usr/local/sbin/ninja-build", R_OK) = - ENOENT (No such file or directory)
access("/usr/local/bin/ninja-build", R_OK) = - ENOENT (No such file or directory)
access("/sbin/ninja-build", R_OK) = - ENOENT (No such file or directory)
access("/bin/ninja-build", R_OK) = - ENOENT (No such file or directory)
access("/usr/sbin/ninja-build", R_OK) = - ENOENT (No such file or directory)
access("/usr/bin/ninja-build", R_OK) = - ENOENT (No such file or directory)
cmake 在设置build program的时候找的是ninja-build程序,而不是ninja程序。
参考:https://stackoverflow.com/questions/38658014/ninja-not-found-by-cmake
CMake Error: CMake was unable to find a build program corresponding to "Ninja".的更多相关文章
- vs2012+cmake+opencv+opencv unable to find a build program corresponding to "Visual Studio 12 Win64". CMAKE_MAKE_PROGRAM is not set
搜索了下,说什么的都有! 一,提示找不到 cmake-2.8.12.1 的 modles 卸载了cmake后发现 cmd 中的 cmake --version 还是 2.8.11.1 找到是我的cyg ...
- CMake Error: your CXX compiler: "" was not found
[root@amax src]# cmake . -- The CXX compiler identification is unknown CMake Error at /usr/local/sha ...
- Linux下执行ls命令提示CMake Error错误
一.系统环境 Fedora10 二.出错情况 执行ls命令出现如下错误提示: CMake Error: The source directory "/etc/--color=auto&quo ...
- mysqlQL 5.7 安装报错CMake Error at cmake/boost.cmake:81 (MESSAGE)
CMake Error at cmake/boost.cmake:81 (MESSAGE): You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BO ...
- CMake Error at cuda_compile_generated_warp.cu.o.cmake:264 (message)
今天,我来给大家分享一下opencv安装时报的错.然后讲错是怎么解决的. 为啥老是写一些环境搭建的博客?因为环境搭建琐碎而繁杂,希望写下来,帮助大家.让大家少走弯路. 专注主业,专注算法的实现和优化. ...
- CMake error with move_base_msgs问题解决
错误 CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake: (find_package): Could not f ...
- CMake Error at cmake/OpenCVUtils.cmake
CMake Error at cmake/OpenCVUtils.cmake:1047 (message): Failed to download . Status= Call Stack (most ...
- CMake Error: Curses library not found. Please install appropriate package
编译安装MySQL的时候,出现错误: -- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) CMake Err ...
- CMake Error at cmake/boost.cmake:76 (MESSAGE):
编译mysql5.7.9的时候报错 CMake Error at cmake/boost.cmake:76 (MESSAGE): You can download it with -DDOWNLOAD ...
随机推荐
- BufferedImage操作图片笔记(转)
BufferedImage是Image的一个子类,BufferedImage生成的图片在内存里有一个图像缓冲区,利用这个缓冲区我们可以很方便的操作这个图片,通常用来做图片修改操作如大小变换.图片变灰. ...
- M2C的概念
M2C即Manufacturers to Consumer(生产厂家对消费者),生产厂家(Manufacturers)直接对消费者(Consumers)提供自己生产的产品或服务的一种商业模式,特点是流 ...
- Python: 字符串搜索和匹配,re.compile() 编译正则表达式字符串,然后使用match() , findall() 或者finditer() 等方法
1. 使用find()方法 >>> text = 'yeah, but no, but yeah, but no, but yeah' >>> text.find( ...
- Siddhi初探
官方对Siddhi的介绍如下: Siddhi CEP is a lightweight, easy-to-use Open Source Complex Event Processing Engine ...
- nginx做http向https的自动跳转
在访问百度时,在浏览器输入www.baidu.com会自动跳转到https://www.baidu.com不用人工干预,nginx也可以做这样的自动跳转! 首先让nginx服务器监听两个端口,分别是8 ...
- SNMP学习笔记之Centos7配置SNMP服务
0x00 安装yum源安装SNMP软件包 1.yum源安装SNMP服务: yum -y install net-snmp net-snmp-utils 2.查看SNMP版本号: snmpd -v 0x ...
- Python Web学习笔记之WebSocket 通信过程与实现
一.什么是 WebSocket ? WebSocket 是一种标准协议,用于在客户端和服务端之间进行双向数据传输.但它跟 HTTP 没什么关系,它是基于 TCP 的一种独立实现. 以前客户端想知道服务 ...
- web.xml配置详解之listener
web.xml配置详解之listener 定义 <listener> <listener-class>nc.xyzq.listener.WebServicePublishLis ...
- Django 将数据库查出的 QuerySet 对象转换为 json 字符串
通过Django查询出MySQL数据库的数据,并将查询出的QuerySet 对象转化成 json 字符串. 写这个例子的作用主要是用来为手机端提供接口用,记录一下,以后 说不准 肯定能用到! ---- ...
- 01: html常用标签
目录: 1.1 web开发的三把利器介绍 1.2 网页头部head标签中几个常用标签 1.3 html常用标签归类 1.4 input系列标签 1.5 HTML其他标签 1.1 web开发的三把利器介 ...