今天需要make一些代码的时候,在Ubuntu 20.04.4 LTS下提示gmake 找不到,于是我打开makefile 发现 make=gmake

root@2a03b162414a:/data/jenkins/workspace/*/build# cat -n CMakeCache.txt | grep make3   # It was generated by CMake: /usr/bin/cmake4    # You can edit this file to change values found and used by cmake.109 //Path to a program.110 CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake

发现 gmake 是 make 的 GNU 版本。我在我的 ubuntu 里面 search 这个软件包。结果没找到 apt-cache search 也没找到。难道 gmake 这么出名的字啊 sourcelist 里面没有?去 Ubuntu forum 里面看了一下说 ubuntu 把别名改了。make 就可以充当 gmake

报错现象

root@d3a89affd3d9:/data/jenkins/workspace/*/build# cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
CMake Error: Generator: execution of make failed. Make command was: /usr/bin/gmake cmTC_92566/fast &&
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):The C compiler"/usr/bin/cc"is not able to compile a simple test program.It fails with the following output:Change Dir: /data/jenkins/workspace/*/build/CMakeFiles/CMakeTmpRun Build Command(s):/usr/bin/gmake cmTC_92566/fast && No such file or directoryGenerator: execution of make failed. Make command was: /usr/bin/gmake cmTC_92566/fast && CMake will not be able to correctly generate this project.
Call Stack (most recent call first):CMakeLists.txt:2 (project)-- Configuring incomplete, errors occurred!
See also "/data/jenkins/workspace/*/build/CMakeFiles/CMakeOutput.log".
See also "/data/jenkins/workspace/*/build/CMakeFiles/CMakeError.log".

解决办法

gmake是GNU Make的缩写。Linux系统环境下的make就是GNU Make,之所以有gmake,是因为在别的平台上,make一般被占用,GNU make只好叫gmake了。比如在安装二进制文件进行编译时要使用make命令,但如果在非GNU系统中运行,必须使用GNU make,而不是使用系统自带的make版本,这时要用gmake代替make进行编译。

sudo ln -s /usr/bin/make /usr/bin/gmake

这样搞定。可以用 gmake 编译了。当然我还是建议通过 apt-get install.
Heaven and the abyss boys will march forward

Ubuntu系统CMake Error: Generator: execution of make failed.相关推荐

  1. windos下Qt Creator CMake error: Generator: execution of make failed. Make command was: jom /nologo al

    本文链接 github.com/BeyondXinXin windos下Qt Creator CMake error: Generator: execution of make failed. Mak ...

  2. 解决“Cmake error :generator: Ninja“问题

    原因在于版本不统一,之前编译过CMakeLists.txt后,产生了缓存文件CMakeCache.txt, 解决方案:删除CMakeCache.txt文件,解决. rm -f `find -name ...

  3. cmake重新编译matlab,ubuntu系统下cmake 编译matlab中mex文件

    cmake 编译工程具有独特的优势,特别对于复杂的工程更是如此.利用matlab直接编译mex文件时,对于文件数据多的工程时,需要列举所有文件,并且要按照依赖关系排 cmake 编译工程具有独特的优势 ...

  4. linux ubuntu系统 ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)数据

    linux ubuntu系统 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)数据 ...

  5. ubuntu 16.04 安装 openCV 3.2 --对该问题的处理CMake Error at cmake/OpenCVModule.cmake:295 (message)

    第一次在CSND上写文章,针对的即是openCV安装过程中的Error. 自己在安装openCV的过程中出现了cmake:295这个错误,但是,看了CSND上很多很多的安装openCV的文章,安装过程 ...

  6. 安装ubuntu系统,报错WslRegisterDistribution failed with error: 0x8007019e

    在windows应用商店安装ubuntu系统,报错WslRegisterDistribution failed with error: 0x8007019e 1.报错: Installing, thi ...

  7. HP笔记本 Linux/Ubuntu 系统,合盖后打开报错:ACPI BIOS ERROR 以及关闭自动开启飞行模式

    HP 笔记本在安装 Ubuntu 系统后,很可能有以下两个 BUG: 合盖后,再开盖时系统无法唤醒,屏幕显示 ACPI BIOS ERROR: 合盖后,即便已经设置了不进入睡眠模式,系统也会断网,再开 ...

  8. Ubuntu 系统打不开图片提示Fatal error reading PNG image File: Not a PNG file

    桌面图片显示如下 打开后显示如下 其实这个是可以打开的,打开方式,鼠标邮件图片选择属性,然后在选择,打开方式选择默认打开方式,ImageMagick 的方法,这样双击图片就能看到图片了 图片出现这样的 ...

  9. 【ubuntu系统】报错:libkmod:ERROR../libkmod/libkmod-config.c:656 kmod_config_parse:/etc/xxxx

    背景:windows10 + ubuntu18.04 LTS 双系统,ubuntu 系统进不去,报错如下图,事情发生的前一天,我安装nvidia驱动没有成功. 报错: 报错如图: 之后按照上面的路径查 ...

最新文章

  1. Java模式(适配器模式)
  2. Spring data redis 异常
  3. ssm把图片保存到项目中_项目中的图片跨域问题解决方式
  4. getTrackbarPos函数
  5. jenkins报错Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) 的处理
  6. mplayer-php,jQuery MPlayer网站音乐播放器插件
  7. Python自学之乐-Python字典实现简单的三级菜单
  8. 服务器图文消息发送规则,群发图文规则 - CurtainRight的个人空间 - OSCHINA - 中文开源技术交流社区...
  9. “我不是个优秀的 Web 开发人员,我只是擅长搜索谷歌”
  10. 华为2017.7.26机试
  11. 分布式大数据多维分析(OLAP)引擎Apache Kylin安装配置及使用示例【转】
  12. linux DISPLAY变量
  13. 【Music】Never took the time
  14. 通讯录管理系统(C++基础 汇总案例)
  15. NameNode格式化——组件恢复,数据丢失
  16. vue实现一键回到顶部
  17. 接口文档编写步骤与格式
  18. 《软件工程与计算》考试复习笔记
  19. php 网页爬虫 cooking,scrapy爬取dmoz/Home
  20. 如何用Python画一只狗狗——turtle基础

热门文章

  1. 做程序员久了。大家有没感觉自己的感情渐渐淡了?
  2. 鸡汤_职场35岁现象:职业规划的文章
  3. manjaro独显无法调节亮度(N卡)
  4. 筑基2期来了,鼓励师阵容强大!同学更是了不得(送封面啦)
  5. Matlab R2016b安装后打开报错:License Manager Error-95
  6. 华为harmonyos 2.0,连接无限可能,华为HarmonyOS 2.0 正式发布
  7. 小区业主入户安检小程序开发
  8. python打包一直出错_PyInstaller打包出错问题解决实践记录
  9. 动态调整线程池参数实践
  10. iphone X 刘海屏适配