从Index of /files下载cmake的各种版本源码,如cmake3.23的cmake-3.23.5.tar.gz,编译源码命令:
tar -zxvf cmake-3.23.5.tar.gz
cd cmake-3.23.5
./configure --prefix=/usr/local/cmake-3.23.5
make && make install
在进行到./configure --prefix=/usr/local/cmake-3.23.5这条命令时,提示没有合适的c编译器:
CMake 3.23.5, Copyright 2000-2022 Kitware, Inc. and Contributors
---------------------------------------------
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和