[CMake] Installing CMake in Ubuntu Linux from command-line via wget

Mateusz Loskot mateusz at loskot.net
Tue Oct 30 07:37:48 EDT 2018


On Tue, 30 Oct 2018 at 12:31, Raymond Wan <rwan.work at gmail.com> wrote:
>
> If you insist on the latest version, then where you have
> "apt-get install" should be replaced with commands that
> Mateusz has already said.  That is, the steps mentioned here:
>
> https://cmake.org/install/

Raymond, the web page explains how to build from sources.
That is the 3rd way of installing CMake.

1. apt-get install cmake
2. Bash installer or manually unpacking .tar.gz. eg.
cmake-3.12.3-Linux-x86_64.tar.gz

wget -O cmake-linux.sh
https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.sh
sudo sh cmake-linux.sh -- --skip-license --prefix=/usr/local

3. Build from sources as per https://cmake.org/install/

> (Perhaps the cmake-linux.sh that Mateusz mentioned works...I
> personally haven't installed a version from cmake.org for a
> very long time, so I wouldn't know.)

I can assure you the option 2. works perfectly

I use it daily to juggle CMake on number of Linux environments

https://github.com/mloskot/wsl-config/blob/master/wsl/scripts/install-cmake-latest.sh

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the CMake mailing list