![尽管安装了 gcc 和 g++,但 cmake 仍找不到 c 编译器](https://linux22.com/image/1178172/%E5%B0%BD%E7%AE%A1%E5%AE%89%E8%A3%85%E4%BA%86%20gcc%20%E5%92%8C%20g%2B%2B%EF%BC%8C%E4%BD%86%20cmake%20%E4%BB%8D%E6%89%BE%E4%B8%8D%E5%88%B0%20c%20%E7%BC%96%E8%AF%91%E5%99%A8.png)
我正在使用 Ubuntu 18.04,并尝试cmake
通过执行以下命令进行安装:
./bootstrap
但我收到了一个错误:
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.
我安装gcc
了g++
4.8.5 版本。当我运行:
sudo./bootstrap
我收到以下错误:
CMake 3.19.0, Copyright 2000-2020 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++ -std=gnu++1y
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate Makefile processor on this system.
Please specify one using environment variable MAKE.
请帮我解决这个错误并安装cmake
。
答案1
make
安装前您需要安装cmake
:
sudo apt install make