# Debian 9, getting cmake-3.9 or above

**URL:** https://discourse.cmake.org/t/debian-9-getting-cmake-3-9-or-above/251
**Category:** Usage
**Created:** [November 25, 2019, 1:28am UTC](https://discourse.cmake.org/t/debian-9-getting-cmake-3-9-or-above/251 "2019-11-25T01:28:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Christian\_Koberg](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@Christian\_Koberg](https://discourse.cmake.org/u/Christian_Koberg)
#### Post date: [November 25, 2019, 1:28am UTC](https://discourse.cmake.org/t/debian-9-getting-cmake-3-9-or-above/251/1 "2019-11-25T01:28:44Z")

</div>

I am running Debian 9 an need cmake v3.9 or higher.

Debian 9 has a package of cmake v3.7.

I go to the page [https://cmake.org/install/](https://cmake.org/install/)

and download cmake-3.15.5.tar.gz source.

First i followed your instructions:

```
Or, an existing CMake installation can be used to build a new version:

  cmake .

  make      

  make install

```

It finished ok, without error report.

The call of cmake failed:

t-user@ch-dell:~/rpclib/build$ cmake …

```
CMake Error: Could not find CMAKE_ROOT !!!

CMake has most likely not been installed correctly.

Modules directory not found in

/usr/local/share/cmake-3.7

CMake Error: Error executing cmake::LoadCache(). Aborting.

```

It intermixed with the old installation of 3.7.

Then i uninstalled the v3.7 package of Debian and removed everything of cmake in the /usr/local/ directories bin, doc, share

and followed your instructions with bootstrap:

```
./bootstrap

make

make install

```

Finished ok, no error report, but calling ‘cmake’:

```
t-user@ch-dell:~/rpclib/build$ cmake ..

bash: /usr/bin/cmake: Datei oder Verzeichnis nicht gefunden

```

???

What is he missing and how to repair it on Debian 9?

regards

Christian Koberg

---

<div class="post-metadata">

### Author: ![Charles\_Gueunet](https://discourse.cmake.org/user_avatar/discourse.cmake.org/charles_gueunet/32/131_2.png) [@Charles\_Gueunet](https://discourse.cmake.org/u/Charles_Gueunet)
#### Post date: [November 25, 2019, 8:43am UTC](https://discourse.cmake.org/t/debian-9-getting-cmake-3-9-or-above/251/2 "2019-11-25T08:43:31Z")

</div>

I think you should use `./cmake` instead of `cmake` in both of your example to avoid using the one in `/usr/bin` The error the second time means _no file or folder found_. This is because by calling `cmake` directly your shell tried to use the one in your `PATH` that you have removed (a new shell or sourcing `/etc/profile` should remove this error).

In practice, once you have installed cmake locally you may want to update your `PATH` or to use the complete path to the cmake executable to use it.

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert.maynard/32/4_2.png) [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)
#### Post date: [November 25, 2019, 1:35pm UTC](https://discourse.cmake.org/t/debian-9-getting-cmake-3-9-or-above/251/3 "2019-11-25T13:35:55Z")

</div>

I also recommend downloading the pre-built linux binaries, instead of building from scratch. The pre-built binaries should work on debain 9.
