[CMake] Installing CMake in Ubuntu Linux from command-line via wget
Raymond Wan
rwan.work at gmail.com
Tue Oct 30 07:31:12 EDT 2018
Hi Osman,
On 30/10/2018 6:56 PM, Osman Zakir wrote:
> Okay, thanks.
>
> So how about this as the command?
>
> "
> RUN wget
> https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz
> \
> && tar xzf cmake-3.12.3-Linux-x86_64.tar.gz \
> && rm -rf cmake-3.12.3-Linux-x86_64.tar.gz \
> && cd cmake-3.12.3-Linux-x86_64 \
> && apt-get install \
> && ./bin/cmake --version
> "
> I think I'll need the apt-get install part to install the
> library. Is this true?
Not quite. I think you should decide whether you want to:
a) Install the latest version from cmake.org
b) Install the latest version within the Ubuntu software
repositories.
If you choose (b) then the latest version in Ubuntu 18.04 is
CMake 3.10.2 . In this case, the command above changes
completely. It is far easier but you'll also not get the
latest version.
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/
(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.)
Anyway, you might want to figure out which path you want first.
Ray
More information about the CMake
mailing list