LoginSignup
2
2

More than 3 years have passed since last update.

cmakeのinstallについて

Posted at

CMakeのバージョンが古かったので更新して詰まった際のメモ

(「Ubuntu に cmake を install する。」 を参考にさせていただきました.)

すでにあるcmakeを消す

sudo apt remove cmake

最新のcmakeを落とす

CMakeのダウンロードページからインストールしたいバージョンのcmakeを落としてきます

wget https://cmake.org/files/v3.19/cmake-3.19.2.tar.gz

configureしようとする

tarを解凍して./configureをしようとします.
([Linux][cmake] 最新のcmakeをインストールする方法によると,./bootstrapというコマンドでも良いらしいです)

tar xvf cmake-3.19.2.tar.gz
cd cmake-3.19.2
./configure

エラーが出ました

  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES
  OPENSSL_INCLUDE_DIR)

エラーを解消する

OpenSSLがないらしいので,落としてきます.
この記事に解決方法が書いてありました.

sudo apt install libssl-dev

これで./configureが動くようになりました.

./configure

後処理

make
sudo make install

これでcmakeが動くようになりました.

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2