LoginSignup
27
20

More than 3 years have passed since last update.

Ubuntu 18.04 に Cmake の Latest Release をインストールする

Last updated at Posted at 2020-04-11

前置き

Ubuntu 18.04 に CMake の Latest Release をインストールする方法をメモとして残しておきます。

実行環境

$ uname -a
Linux JetsonNano 4.9.140-tegra #1 SMP PREEMPT Mon Dec 9 22:47:42 PST 2019 aarch64 aarch64 aarch64 GNU/Linux

CMake の Latest Release のインストール

https://cmake.org/install/ を参考にしました。

まず、https://cmake.org/download/ から CMake のソース Unix/Linux Source (has \n line feeds) をダウンロードし、解凍します。以下、CMake Latest のバージョンに関する部分は、https://cmake.org/download/ を参考に適宜変更して下さい。

$ wget https://github.com/Kitware/CMake/releases/download/v3.17.1/cmake-3.17.1.tar.gz
$ tar zxvf cmake-3.17.1.tar.gz

次に、ダウンロードしたソースをビルドします。

$ cd cmake-3.17.1/
$ ./bootstrap
$ make
$ sudo make install

CMake のパスを通す

$ echo 'export PATH=$HOME/cmake-3.17.1/bin/:$PATH' >> ~/.bashrc
$ source ~/.bashrc

CMake のバージョンの確認

$ cmake --version
cmake version 3.17.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
27
20
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
27
20