ubuntu 底下安裝 cmake 3.19.0

移除

sudo apt remove --purge --auto-remove cmake

https://cmake.org/download/ 這邊使用3.19.0 https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0.tar.gz

mkdir ~/temp
cd ~/temp
wget https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0.tar.gz
tar -xzvf cmake-3.19.0.tar.gz
cd cmake-3.19.0/
./bootstrap
make -j$(nproc)
sudo make install

若提示錯誤

CMake Error at Utilities/cmcurl/CMakeLists.txt:505 (message):
  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

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *