首页 > 系统相关 >Ubuntu cmake 安装以及问题解决(muduo库编译)

Ubuntu cmake 安装以及问题解决(muduo库编译)

时间:2023-02-13 22:12:22浏览次数:49  
标签:muduo CMAKE CMake CXX Ubuntu cmake COMPILER compiler

1、安装cmake sudo apt-get install cmake

 

2、安装之后查看是否安装成功: cmake --version

3、出现  No CMAKE_C_COMPILER could be found.如何解决

使用cmake命令时发现,cmake --version获取版本成功了

但是编译却找不到。

cmake ..
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:21 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:21 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
 

解决办法:
执行
    sudo apt-get update
    sudo apt-get install -y build-essential

标签:muduo,CMAKE,CMake,CXX,Ubuntu,cmake,COMPILER,compiler
From: https://www.cnblogs.com/blj28/p/17118018.html

相关文章

  • Ubuntu22.0.4时间同步
    UTC,即UniversalTimeCoordinated,协调世界时GMT,即GreenwichMeanTime,格林尼治平时RTC时间,即Real-timeclock,是电脑的硬件时间Windows与Linux缺省系统硬件时间:Window......
  • 卸载ubuntu自带的docker-ce版本,保留数据升级
    1、卸载(之前安装的是docker-ce)apt-getremovedocker-cedocker-ce-cliaptlist--installed|grepdocker发现还有几个docker相关的,一并卸载2、删除相关文件,不然......
  • ubuntu编译mtk依赖
    更新源1、sudoapt-getupdate2、sudoapt-getinstallgccg++build-essentialasciidocbinutilsbzip2gawkgettextgitlibncurses5-devlibz-devpatchflexbis......
  • C++ 修改防火墙firewall设置(Linux、Ubuntu、CentOS)
    1、简介1.1Ubuntuhttps://ubuntu.com/download/desktopUbuntu是一个以桌面应用为主的Linux操作系统,其名称来自非洲南部祖鲁语或豪萨语的“ubuntu"一词,意思是“人性”“......
  • Docker容器的ubuntu镜像配置apt国内源
    1、问题描述  在Docker容器中安装ubuntu镜像之后,默认使用的软件源是ubuntu的官网,速度非常慢,更新软件包经常报错  而且初始镜像默认没有安装vim命令,导致修改​​/etc/ap......
  • 查看linux是centos还是ubuntu的方法
    以下总结了4种区分centos和ubuntu系统的方法。1、lsb_release-a如果是想查看你的Linux系统是Ubuntu还是CentOS,可以使用lsb_release-a命令,lsb_release-a命令可以列出你......
  • ubuntu 下安装 samba
    https://www.cnblogs.com/kengshen/p/16844240.html点击查看代码[share]comment=PrinterDriverspath=/home/hugh/sharebrowseable=yesguestok......
  • ubuntu 安装 github desktop
    原文:https://gist.github.com/berkorbay/6feda478a00b0432d13f1fc0a50467f1sudowgethttps://github.com/shiftkey/desktop/releases/download/release-3.1.1-linux1/Gi......
  • Clion在一个cmake项目中运行多个main函数
    #遍历项目根目录下所有的.cpp文件file(GLOBfiles*.cpp*/*.cpp)foreach(file${files})string(REGEXREPLACE".+/(.+)\\..*""\\1"exe${file})add_e......
  • 解决 Ubuntu 22.04 下 flameshot 截图工具无法使用的问题
    问题描述flameshot是Linux端广受好评的一款截图工具,但在Ubuntu22.04中,安装完成后却不能使用,表现为截图命令无响应,或截图过程报错通过查阅flameshot仓库的issue......