1,查看版本:cmake --version 2,下载:wget https://cmake.org/files/v3.16/cmake-3.16.2.tar.gz 3,解压:tar xf cmake-3.16.2.tar.gz 4,进入目录:cd cmake-3.16.2/ 5,编译和安装:
./configure
sudo make
sudo make install
6,查看当前版本:
hash -r
cmake --version
错误:
Could not
find OpenSSL. Install an OpenSSL development package or
configure CMake with -DCMAKE_USE_OPENSSL
=OFF to build without OpenSSL.
修复:sudo apt-get install libssl-dev
参考: ubuntu18 升级cmake cmake安装高版本