CMake Error at CMakeLists.txt: No CMAKE_CXX_COMPILER could be found.

系统环境:Ubuntu 22.04.1

1. 问题发生

-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:4 (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.


-- Configuring incomplete, errors occurred!
See also "/home/echo/Desktop/njord/gdal-3.7.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/echo/Desktop/njord/gdal-3.7.0/build/CMakeFiles/CMakeError.log".

2. 解决方法

执行如下命令,即安装 build-essential

sudo apt-get update && sudo apt-get install build-essential
posted @   槑孒  阅读(800)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
历史上的今天:
2022-07-25 ArcGIS api for JS三种查询方法比较
点击右上角即可分享
微信分享提示