0%

cmake安装

cmake安装

# 到官网 https://cmake.org/download/ 下载最新的包
wget https://github.com/Kitware/CMake/releases/download/v3.30.0/cmake-3.30.0-linux-x86_64.tar.gz

# 解压
tar -zxvf cmake-3.30.0-linux-x86_64.tar.gz

# 改个名字并移动到/usr/local目录下
mv cmake-3.30.0-linux-x86_64 cmake
mv cmake /usr/local/

# 添加bin到环境变量
export PATH=/usr/local/cmake/bin:$PATH

# 测试
cmake --version