LoginSignup
0
0

More than 1 year has passed since last update.

指定のディレクトリへのcmakeのinstall

Last updated at Posted at 2022-04-09

cmakeの説明については割愛します。

事前に以下を実行しておく

sudo apt install build-essential
sudo apt-get install libssl-dev

cmakeをダウンロードする

https://cmake.org/
ダウンロードボタンをクリック
cmake1.PNG
Unix/Linuxプラットフォームの最新版をクリック
cmake2.PNG

Downloadされたtar.gzファイルを解凍する

筆者の環境はWSL2のUbuntu20.04LTS
以下を実行

tar -xvzf cmake-3.23.0.tar.gz

指定ディレクトリへのインストール

解凍したディレクトリ内に入る

cd cmake-3.23.0

インストールする。因みに結構時間がかかる

./configure --prefix=インストールしたいディレクトリのフルパス/cmake
make -j 4
make install

PATHを通す

bashrcに以下を追記

PATH="$PATH":インストールしたディレクトリのフルパス/cmake/bin

保存してターミナルで以下を実行

source ~/.bashrc

インストールできたか確認するため以下を実行

cmake

以下のように出力されたらOK
キャプチャ.PNG

0
0
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
0
0