DEV Community

loading...

How to install CMAKE (lastest version)

swervin profile image SolBeen Kwon ・1 min read

Let's install openssl before installing cmake.

1. openSSL install
homepage download
openssl download

sudo apt install wget
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
tar openssl-1.1d.tar.gz
cd openssl-1.1.1d
Enter fullscreen mode Exit fullscreen mode

build OpenSSL

./config
make
make test
sudo make install
Enter fullscreen mode Exit fullscreen mode

2.Cmake at lastest version install

2.1 홈페이지에서 다운로드

cmake download

2.2 wget 으로 다운로드

wget https://cmake.org/files/v3.16/cmake-3.16.2.tar.gz

Enter fullscreen mode Exit fullscreen mode

2.3 압축풀기 및 설치

$ tar -xvzf 해당파일.tar.gz
$ cd 압축풀린폴더
$ ./bootstrap --prefix=/usr/local
$ make
$ make install

Enter fullscreen mode Exit fullscreen mode

2.4 설치 확인

$ cmake --version

Enter fullscreen mode Exit fullscreen mode

만약에 해당 명령어를 찾을 수 없다고 나오는 경우에는

$ vi ~./bash_profile

Enter fullscreen mode Exit fullscreen mode

아래와 같이 패스 수정

PATH=/usr/local/bin:$PATH:$HOME/bin
Enter fullscreen mode Exit fullscreen mode

그 다음 ssh 를 재시작 하면 된다.

Discussion (0)

pic
Editor guide