# Getting latest version of cmake using apt-get

**URL:** https://discourse.cmake.org/t/getting-latest-version-of-cmake-using-apt-get/10401
**Category:** Usage
**Tags:** os:linux
**Created:** [March 18, 2024, 10:47pm UTC](https://discourse.cmake.org/t/getting-latest-version-of-cmake-using-apt-get/10401 "2024-03-18T22:47:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![steverb](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@steverb](https://discourse.cmake.org/u/steverb)
#### Post date: [March 18, 2024, 10:47pm UTC](https://discourse.cmake.org/t/getting-latest-version-of-cmake-using-apt-get/10401/1 "2024-03-18T22:47:00Z")

</div>

I’m building a machine using Vagrant, the box is bionic64. “apt-get install cmake” gives me version 3.10.2. Is that the latest I can use, on Ubuntu 18.04? I was hoping for something closer to 3.29.

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [March 18, 2024, 10:49pm UTC](https://discourse.cmake.org/t/getting-latest-version-of-cmake-using-apt-get/10401/2 "2024-03-18T22:49:24Z")

</div>

It’s typical to extract the binary executables for CMake from [Releases · Kitware/CMake · GitHub](https://github.com/Kitware/CMake/releases)  
which are compiled against a GLIBCXX old enough to work on most Linux systems.

---

<div class="post-metadata">

### Author: ![steverb](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@steverb](https://discourse.cmake.org/u/steverb)
#### Post date: [March 19, 2024, 12:37pm UTC](https://discourse.cmake.org/t/getting-latest-version-of-cmake-using-apt-get/10401/3 "2024-03-19T12:37:58Z")

</div>

OK, but how do I do that in an automated way, in the Vagrant file? (I’ve installed newer versions manually, yes).

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [March 19, 2024, 2:55pm UTC](https://discourse.cmake.org/t/getting-latest-version-of-cmake-using-apt-get/10401/4 "2024-03-19T14:55:53Z")

</div>

I would use curl, then tar to extract and put that extracted bin path on env car Path. That should be three lines of shell script for the vagrant file

---

<div class="post-metadata">

### Author: ![steverb](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@steverb](https://discourse.cmake.org/u/steverb)
#### Post date: [March 19, 2024, 2:58pm UTC](https://discourse.cmake.org/t/getting-latest-version-of-cmake-using-apt-get/10401/5 "2024-03-19T14:58:09Z")

</div>

OK, thanks for the help.
