Installing cmake3.9 in ubuntu18.04

How to install cmake 3.9 or higher version in Ubuntu 18.04? I am using:

sudo apt-get install cmake

And then trying to check version using:

cmake --version

All I am getting is:

cmake version 3.5.0-rc2
CMake suite maintained and supported by Kitware ().

Can you please help me to install said version of cmake?

2

1 Answer

You can download CMake v3.9.0 for 64-bit Linux from here (WARNING: direct link). After downloading, open up the folder containing the download in a Terminal, and run the following:

$ sudo apt-get install build-essential
$ tar xvzf cmake-3.9.0-Linux-x86_64.tar.gz
$ cd cmake-3.9.0
$ ./configure
$ make
$ sudo make install

This would install cmake to /usr/local/bin. You can invoke it as /usr/local/bin/cmake.

Let me know if I made any mistakes.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like