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

Mateusz Loskot mateusz at loskot.net
Tue Oct 30 08:09:13 EDT 2018


On Tue, 30 Oct 2018 at 12:59, Osman Zakir <osmanzakir90 at hotmail.com> wrote:
>
> I put "apt-get install" in the CMake folder that I got from unpacking the .tar file.  Would that not install the CMake in that directory?

No!
The .tar.gz is not a .deb package, it does not contain a .deb package.

You need to read about apt and .deb packages

> What do I have to do in order for it to install the CMake executable I downloaded

Unpack the .tar.gz, that's it.
Optionally, copy somewhere you prefer in your Linux environment.

> and also add it to my PATH?

export PATH=/path/where/you/unpacked/cmaketarg/bin:$PATH


Alternatively,
iIf you stopped stubbornly trying the apt-get and
if you tried my suggestion

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

you would get CMake installed in the standard prefix /usr/local
with cmake executable deployed in /usr/local/bin/cmake
and having /usr/local/bin typically in PATH
you would get cmake in your PATH out of the box.

Just forget about using apt-get with the downloaded .tar.gz, forget it!
Or, learn about Debian packages, apt, etc. just not here!

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


More information about the CMake mailing list