카테고리 없음

Ubuntu에 CMAKE 설치하기

yisj 2023. 11. 4. 21:19

1. apt 를 이용한 설치 (구버전이 설치됨)

$ sudo apt install cmake
 

 

2. 직접 최신버전 설치

2.1 홈페이지에서 다운로드

https://cmake.org/download

 
Download | CMake

Current development distribution Each night binaries are created as part of the testing process. Other than passing all of the tests in CMake, this version of CMake should not be expected to work in a production environment. It is being produced so that us

cmake.org
2.2 wget 으로 다운로드

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

2.3 압축풀기 및 설치

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

2.4 설치 확인

$ cmake --version
 

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

$ vi ~./bash_profile
 

아래와 같이 패스 수정

PATH=/usr/local/bin:$PATH:$HOME/bin
그 다음 ssh 를 재시작