LoginSignup
1
0

More than 3 years have passed since last update.

CENTOS8.0にcmake3.15.2をインストール

Last updated at Posted at 2019-10-22

ネットワークからソースコードを下ろすためにyumを使ってwgetとインストールする。またmakeをインストールする。

sudo yum install wget
sudo yum install make

次にcmake.orgからからソースコードをzipファイルでダウンロードする。

sudo wget https://cmake.org/files/v3.15/cmake-3.15.2.tar.gz

zipファイルを展開

tar zxvf cmake-3.15.2.tar.gz

cmakeのディレクトリに入る。

cd cmake-3.15.2

Buildを行う。

./bootstrap --prefix=/opt/cmake –-no-system-libs

makeを行う。

make -j4

インストール

sudo make install

bashrcを編集してPATH指定を行う。

sudo vi /etc/bashrc

キーボードでaをクリックすると編集作業ができる。最終行に以下の文を追加する。

PATH=$PATH:/opt/cmake/bin

**[esp]キーをクリックし:wqで保存される。

最後に以下のコマンドを入力する。

source /etc/bashrc
1
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
1
0