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
64
$ which cmake
/usr/bin/cmake
$ cmake --version
cmake version 2.8.12.2
$ which ninja
/usr/bin/ninja
$ ninja --version
1.7.1
问题:使用cmake工具且选用Ninja作为编译工具(build program)时,报错,找不到Ninja的程序,具体信息如下:
1 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.2 CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.3 Missing variable is:4 CMAKE_C_COMPILER5 CMake Error: Could not find cmake module file: /home/jgeng/avs2-build/CMakeFiles/2.8.12.2/CMakeCCompiler.cmake6 CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.7 Missing variable is:8 CMAKE_CXX_COMPILER_ENV_VAR9 CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
10 Missing variable is:
11 CMAKE_CXX_COMPILER
12 CMake Error: Could not find cmake module file: /home/jgeng/avs2-build/CMakeFiles/2.8.12.2/CMakeCXXCompiler.cmake
13 -- Configuring incomplete, errors occurred!
解决方法:
# ln -s /usr/bin/ninja /usr/bin/ninja-build
# strace cmake -GNinja .. | grep -i ninja
access("ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/sbin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/bin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/sbin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/ninja-build", R_OK) = -1 ENOENT (No such file or directory)
cmake 在设置build program的时候找的是ninja-build程序,而不是ninja程序。
CMake Error: CMake was unable to find a build program corresponding to Ninja.相关推荐
- VS cmake 远程开发 opencv报错:CMake was unable to find a build program corresponding to “Ninja“.(换个构建方式)
构建的时候报错: 1> /usr/bin/cmake -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMA ...
- 老卫带你学---CMake Error: CMake was unable to find a build program corresponding to MinGW Makefiles. CM
CMake编译OpenCV3.1.0过程中一直出错: CMake Error: CMake was unable to find a build program corresponding to &q ...
- 【已解决】CMake Error: Cannot determine link language for target “xxx“. CMake Error: CMake can not determ
报错: CMake Error: Cannot determine link language for target "CMakeLists". CMake Error: CMak ...
- CMake Error: The source directory “/~./opencv-4.5.0/build“ does not appear to contain CMakeLists.tx
这个报错很离谱,找了很多方法 最后发现是编译的时候代码写错了 原来写的是 sudo cmake /home/nama/Downloads/opencv-4.5.0/build -D CMAKE_BUI ...
- cmake错误:CMake Error: CMake can not determine linker language for target
解决方案: 因为你的library只有头文件,没有cpp文件 在add_library中增加cpp文件 同时建立一个空的cpp文件即可
- CMake Error: The current CMakeCache.txt directory is different...
CMake Error: The current CMakeCache.txt directory is different... 使用 NXP sdk编译时会出现如下错误: CMake Error: ...
- cmake error C2220: 以下警告被视为错误
cmake error C2220: 以下警告被视为错误 错误原因:原因是该文件的代码页为英文,而我们系统中的代码页为中文. 解决方法1: 1,将源码转化为正确的编码方式 用VS2013打开对 ...
- 【linux】CMake Error in CMakeLists.txt: No CMAKE_CXX_COMPILER could be found.
– The C compiler identification is GNU 7.5.0 – The CXX compiler identification is unknown – Check fo ...
- mysql安装提示language错误_MySQL 安装 CMake Error CMAKE_CXX_COMPILER not set
新装的机器Gnome-Ubuntu-13.10,编译安装mysql-5.6.14.tar.gz 命令 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/database/ ...
最新文章
- 解决cocos2dx 3.x 导入cocostudio的ui界面出现错位问题
- @Async注解配合@EnableAsync注解使用
- 运维专家:我在大数据项目中踩过的那些坑
- 为什么打不开_发票查重百科导出的发票台账为什么附件打不开?
- Odoo10参考系列--翻译模块
- 关于本博客数据仓库方面的原创文章汇总
- 遗传算法中适值函数的标定与大变异算法
- html 层次选择器,jquery层次选择器
- KeyPass密码管理软件使用说明
- global mapper将cad格式数据框选范围导出高质量图片
- flash cs4 是过渡性产品吗?
- php比较asc,php小技巧之过滤ascii控制字符
- 新浪微博爬虫:模拟登陆+爬取原始页面
- 【Leetcode刷题篇】leetcode437 路径总和III
- 计算机网络软件系统是什么结构,计算机软件系统的组成是什么?
- sis最新地址获取方法_拳头最新FPS游戏VALORANT资格免费获取方法
- 交换游戏(记忆化搜索,状态压缩,位运算)
- 分子运动android,分子热运动
- ChatGPT 免费体验来了
- Unity3D 角度 弧度 向量