Installing CMake in Ubuntu Linux from command-line via wget

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing CMake in Ubuntu Linux from command-line via wget

Osman Zakir
I want to install the latest release version of CMake in my Ubuntu Docker image (from the Dockerfile), but I'm having trouble.  I have this command:

"
RUN wget https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz  \
   && tar 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
"
I had this error: 
"
tar: Old option 'L' requires an argument.
Try 'tar --help' or 'tar --usage' for more information.
"
Any idea how I can fix this?  Or should I ask on a Linux forum?

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Mateusz Loskot
On Tue, 30 Oct 2018 at 10:22, Osman Zakir <[hidden email]> wrote:
>
> I want to install the latest release version of CMake in my Ubuntu Docker image (from the Dockerfile), but I'm having trouble.  I have this command:
>
> "
> RUN wget https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz  \
>    && tar 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

Hmm, are you cerctain apt-get is capable of installing from .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
cmake --version

I guess, it may be a good idea to update https://cmake.org/install/

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

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Ian Cullen
If you want to stick to your original method you need to add some
command line arguments to tar to tell it that is is extracting a
compressed file.

The binary is then available within the extracted directory.

Original command becomes:

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  \
    && ./bin/cmake --version


tar options:
x - Extract
z - Archive type is gzip (may be optional, depending on version of tar)
f - The file to extract (tar will try and open whatever follows this
argument so it MUST come last in this case)



On 30/10/2018 09:27, Mateusz Loskot wrote:

> On Tue, 30 Oct 2018 at 10:22, Osman Zakir <[hidden email]> wrote:
>> I want to install the latest release version of CMake in my Ubuntu Docker image (from the Dockerfile), but I'm having trouble.  I have this command:
>>
>> "
>> RUN wget https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz  \
>>     && tar 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
> Hmm, are you cerctain apt-get is capable of installing from .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
> cmake --version
>
> I guess, it may be a good idea to update https://cmake.org/install/
>
> Best regards,,

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Osman Zakir
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?

From: CMake <[hidden email]> on behalf of Ian Cullen <[hidden email]>
Sent: Tuesday, October 30, 2018 2:52 PM
To: [hidden email]
Subject: Re: [CMake] Installing CMake in Ubuntu Linux from command-line via wget
 
If you want to stick to your original method you need to add some
command line arguments to tar to tell it that is is extracting a
compressed file.

The binary is then available within the extracted directory.

Original command becomes:

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  \
    && ./bin/cmake --version


tar options:
x - Extract
z - Archive type is gzip (may be optional, depending on version of tar)
f - The file to extract (tar will try and open whatever follows this
argument so it MUST come last in this case)



On 30/10/2018 09:27, Mateusz Loskot wrote:
> On Tue, 30 Oct 2018 at 10:22, Osman Zakir <[hidden email]> wrote:
>> I want to install the latest release version of CMake in my Ubuntu Docker image (from the Dockerfile), but I'm having trouble.  I have this command:
>>
>> "
>> RUN wget https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz  \
>>     && tar 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
> Hmm, are you cerctain apt-get is capable of installing from .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
> cmake --version
>
> I guess, it may be a good idea to update https://cmake.org/install/
>
> Best regards,,

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Raymond Wan-2

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



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Mateusz Loskot
On Tue, 30 Oct 2018 at 12:31, Raymond Wan <[hidden email]> 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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Osman Zakir
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?  That's what I'm asking.  What do I have to do in order for it to install the CMake executable I downloaded and also add it to my PATH?  

From: CMake <[hidden email]> on behalf of Mateusz Loskot <[hidden email]>
Sent: Tuesday, October 30, 2018 4:37 PM
To: [hidden email]
Subject: Re: [CMake] Installing CMake in Ubuntu Linux from command-line via wget
 
On Tue, 30 Oct 2018 at 12:31, Raymond Wan <[hidden email]> 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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Mateusz Loskot
On Tue, 30 Oct 2018 at 12:59, Osman Zakir <[hidden email]> 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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Osman Zakir
I thought I'd already said that I can't use sudo or anything else with root access privileges.  I want to deploy the Docker image to Heroku and Heroku doesn't run Docker images with root user access.

I'll forget about "apt-get", but I still want to put CMake into /usr/local/ somewhere without using root user access, if that's possible.  

How do I find out in the Docker image where the CMake files were unpacked to so I can add that path to the PATH variable?  Since I used wget like with Boost, and Boost was installed in /usr/local/boost_1_68_0 (and Boost with its build tool was also installed /usr/local/ itself), it's possible that CMake's path is something similar.  

From: CMake <[hidden email]> on behalf of Mateusz Loskot <[hidden email]>
Sent: Tuesday, October 30, 2018 5:09 PM
To: [hidden email]
Subject: Re: [CMake] Installing CMake in Ubuntu Linux from command-line via wget
 
On Tue, 30 Oct 2018 at 12:59, Osman Zakir <[hidden email]> 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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Roger Leigh
In reply to this post by Osman Zakir
On 30/10/2018 10:56, 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?

No.  Just add the bin directory to your PATH.

apt-get is only required when installing packages provided by the
package manager.  It has nothing to do with installing archives you
download.


Roger
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Osman Zakir
Would it be okay to add the relative path to the current directory to the PATH variable if I don't know the exact path?  Or would that not be a good idea?

From: CMake <[hidden email]> on behalf of Roger Leigh <[hidden email]>
Sent: Tuesday, October 30, 2018 5:54 PM
To: [hidden email]
Subject: Re: [CMake] Installing CMake in Ubuntu Linux from command-line via wget
 
On 30/10/2018 10:56, 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?

No.  Just add the bin directory to your PATH.

apt-get is only required when installing packages provided by the
package manager.  It has nothing to do with installing archives you
download.


Roger
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Osman Zakir
Like if I cd into the CMake bin directory and then add the relative path to the current directory to the PATH.

From: Osman Zakir <[hidden email]>
Sent: Tuesday, October 30, 2018 6:01 PM
To: [hidden email]
Subject: Re: [CMake] Installing CMake in Ubuntu Linux from command-line via wget
 
Would it be okay to add the relative path to the current directory to the PATH variable if I don't know the exact path?  Or would that not be a good idea?

From: CMake <[hidden email]> on behalf of Roger Leigh <[hidden email]>
Sent: Tuesday, October 30, 2018 5:54 PM
To: [hidden email]
Subject: Re: [CMake] Installing CMake in Ubuntu Linux from command-line via wget
 
On 30/10/2018 10:56, 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?

No.  Just add the bin directory to your PATH.

apt-get is only required when installing packages provided by the
package manager.  It has nothing to do with installing archives you
download.


Roger
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Installing CMake in Ubuntu Linux from command-line via wget

Mateusz Loskot
In reply to this post by Osman Zakir
On Tue, 30 Oct 2018 at 13:26, Osman Zakir <[hidden email]> wrote:
>
> I thought I'd already said that I can't use sudo or anything else with root access privileges.

I forgot about this constraint.

Then, make use of the custom --prefix

mkdir $HOME/usr
wget -O cmake-linux.sh
https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.sh
sh cmake-linux.sh -- --skip-license --prefix=$HOME/usr
export PATH=$HOME/usr/bin:$PATH

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

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
--
Mateusz Loskot
http://mateusz.loskot.net