1.安装gcc, g++, make等编译器
sudo apt-get install build-essential
2.安装cmake编译工具
先下载源码包解压到指定目录 https://cmake.org/files/
tar -zxvf cmake-3.13.4-Linux-x86_64.tar.gz -C /opt/
然后配置/etc/profile
export PATH=$PATH:/opt/cmake-3.13.4-Linux-x86_64/bin
3.测试
gcc -v
g++ -v
make -v
cmake --version