# Install CMake on Mint

**URL:** https://discourse.cmake.org/t/install-cmake-on-mint/997
**Category:** Usage
**Tags:** os:linux
**Created:** [April 12, 2020, 6:00pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997 "2020-04-12T18:00:06Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 12, 2020, 6:00pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/1 "2020-04-12T18:00:06Z")

</div>

I had installed CMake on Mint, I guess. When I execute it notthing happens! Even a negative message appear!

Someone could help me?

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [April 12, 2020, 10:32pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/2 "2020-04-12T22:32:46Z")

</div>

Do you mean you are trying to run the CMake GUI (clicking on an icon or selecting CMake from the menu) rather than one of the command line tools (`cmake` or `ccmake`)?

Can you clarify how you installed CMake? I’m aware of an issue with symptoms similar to yours for some people who have installed CMake as a snap (recent forum thread can be found [here](https://forum.snapcraft.io/t/seeking-feedback-from-people-having-problems-with-cmake-snap/16527)).

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 12, 2020, 11:36pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/3 "2020-04-12T23:36:25Z")

</div>

Hello, Craig,

Yes, I am cliking on icon. I tried it on Windows 10. It open a screen that has: File, Tools and Options.

It require Visual Studio, that I installed. On message it inform in red :

could not find any instance of Visual Studio.

I tried on Linux Mint, cliking on icon. On Mint noting happens!

Could you help?

Thank you in advance.

Wilmar- Goiânia - Brazil

On social isolation!

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [April 12, 2020, 11:39pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/4 "2020-04-12T23:39:07Z")

</div>

If you are comfortable working at a terminal in Linux, could you open up a terminal and run the command

```auto
cmake-gui

```

Report back what happens when you do that, including any output that appears in the terminal after you run that command.

Can you please confirm how you installed CMake on Mint. That is a very important detail for this particular problem.

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 13, 2020, 1:14pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/5 "2020-04-13T13:14:28Z")

</div>

I had installed it last year and I do not remember. It is better to install again. There are many options and I don’t know to choose. Can you help?

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 13, 2020, 1:54pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/6 "2020-04-13T13:54:08Z")

</div>

My Linux is Mint 19. When I try do uninstall cmake with command

> sudo apt purge --auto-remove cmake  
> system reply: cmake not installed.

So, I proceed with command to install:

administrador-desktop:~$ sudo snap install cmake --classic.

The system reply:

snap “cmake” is already installed, see ‘snap help refresh’

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 13, 2020, 2:07pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/7 "2020-04-13T14:07:37Z")

</div>

Oh, yes…I got the begining:

administrador@administrador-desktop:~$ cmake  
Usage

cmake [options]   
cmake [options]   
cmake [options] -S -B

Specify a source directory to (re-)generate a build system for it in the  
current working directory. Specify an existing build directory to  
re-generate its build system.

Run ‘cmake --help’ for more information.

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 13, 2020, 2:26pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/8 "2020-04-13T14:26:13Z")

</div>

I want to open the GUI

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 13, 2020, 2:51pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/9 "2020-04-13T14:51:05Z")

</div>

On the administrador directory has directory snap. On it there is the cmake directory. On the cmake directory there are the directories:

common current

but they are empty!

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 13, 2020, 3:08pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/10 "2020-04-13T15:08:27Z")

</div>

I guess I need to re-install it. The directory Example where I can picup CMakeLists.txt and main.cc is not there.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [April 13, 2020, 9:46pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/11 "2020-04-13T21:46:12Z")

</div>

I doubt reinstalling will make much difference. Your comments indicate that you do have CMake installed as a snap. That at least helps narrow things down.

To run the CMake GUI from the command line, you use the following command:

```auto
cmake-gui

```

Please try that and report what you see here. I suspect you are one of the people seeing the problem that a few others have reported, so I’m quite interested in what the above shows for you.

After you’ve done that, I suggest you remove the CMake snap and install CMake via a different method. First, to remove CMake do the following:

```auto
sudo snap remove cmake

```

Then you can install CMake again from one of the following methods:

- Download the official CMake package as a tarball and unpack it somewhere. You will need to update your `PATH` environment variable to include the `bin` directory of wherever you unpack it to. This should work on just about any Linux distribution. You can find the packages here: [https://cmake.org/download/](https://cmake.org/download/)
- I don’t know if the Kitware apt repository would be suitable for your distribution or not. I guess you could try it, but perhaps @kyle.edwards can offer a more informed view on this. You can find details about it here: [https://apt.kitware.com](https://apt.kitware.com)

BTW @kyle.edwards @robert.maynard ~~it might be good to add a link or some comments about the APT repo on the [https://cmake.org/download](https://cmake.org/download) page to make it more discoverable~~. **Update:** I see now that it is there further down the page in the _Alternative Binary Releases_ section, but since it follows after the _Previous Release_ section, I suspect many like myself will rarely scroll down that far to see it.

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 14, 2020, 12:21am UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/12 "2020-04-14T00:21:57Z")

</div>

Dear Craig,

The command cmake-gui was accepted but fail:

ministrador@administrador-desktop:~$ cmake-gui  
qt5ct: using qt5ct plugin  
qt5ct: D-Bus global menu: no  
Falha de segmentação (imagem do núcleo gravada)

So I proceeded to uninstall it:

sudo snap remove cmake

It was removed.

The next step is to re-install…but internet of 1 Mbps and wife on Netflix made me postpone it to tomorow morning!

Thank you Craig.

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 14, 2020, 12:36pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/13 "2020-04-14T12:36:52Z")

</div>

Dear Craig,

I download the file and put it on a bin directory. After that :

administrador@administrador-desktop:~/bin$ tar -xzvf cmake-3.17.1.tar.gz

Now I am trying to install…

I will inform you if I manage to do.

Sincerely,

Wilmar.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [April 14, 2020, 12:50pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/14 "2020-04-14T12:50:44Z")

</div>

The releases on [https://apt.kitware.com/](https://apt.kitware.com/) are built against Ubuntu 16.04, and are suitable for 18.04 as well. Since Linux Mint is Ubuntu-based, they should work on Mint as well. (I myself have it installed on my Mint computer at home, using the Xenial distro, since my version of Mint is based on Xenial. Newer versions may be based on Bionic, but should still work.)

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 14, 2020, 1:39pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/15 "2020-04-14T13:39:58Z")

</div>

I follow orientation on [https://apt.kitware.com/](https://apt.kitware.com/). On it I choose “For Ubuntu Bionic Beaver (18.04)”, but I am not sure if it was the correct option.

The last command sudo apt-get install cmake was well done.

I think that cmake is installed. How can I start using? I tried the command:

~/bin/cmake-3.17.1$ cmake and ~/bin/cmake-3.17.1$ cmake-gui,

but those commands aren’t found.

Thank you for your advice.

Wilmar.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [April 14, 2020, 1:43pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/16 "2020-04-14T13:43:44Z")

</div>

If CMake has been installed, you should see it at `/usr/bin/cmake`. You can also run:

```auto
$ dpkg -L cmake

```

to see the list of files installed by the package.

If you want `cmake-gui`, you will need to install it separately from the `cmake-qt-gui` package.

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 14, 2020, 2:05pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/17 "2020-04-14T14:05:35Z")

</div>

I guess the command confirm it was installed:

administrador@administrador-desktop:~/bin/cmake-3.17.1$ dpkg -L cmake  
/.  
/usr  
/usr/bin  
/usr/bin/ctest  
/usr/bin/cmake  
/usr/bin/cpack  
/usr/share  
/usr/share/doc  
/usr/share/doc/cmake  
/usr/share/doc/cmake/NEWS.Debian.gz  
/usr/share/doc/cmake/changelog.Debian.gz  
/usr/share/doc/cmake/copyright  
/usr/share/bash-completion  
/usr/share/bash-completion/completions  
/usr/share/bash-completion/completions/ctest  
/usr/share/bash-completion/completions/cmake  
/usr/share/bash-completion/completions/cpack  
/usr/share/man  
/usr/share/man/man1  
/usr/share/man/man1/ctest.1.gz  
/usr/share/man/man1/cmake.1.gz  
/usr/share/man/man1/cpack.1.gz  
administrador@administrador-desktop:~/bin/cmake-3.17.1$

I need to start using, but how?

Thank you for an advice.

Wilmar.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [April 14, 2020, 2:10pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/18 "2020-04-14T14:10:23Z")

</div>

Is `/usr/bin` in your `$PATH`?

---

<div class="post-metadata">

### Author: ![Wilmar](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/48db29/32.png) [@Wilmar](https://discourse.cmake.org/u/Wilmar)
#### Post date: [April 14, 2020, 2:32pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/19 "2020-04-14T14:32:58Z")

</div>

Hi,

I think so:

administrador@administrador-desktop:/usr/bin$ **echo $PATH**

/home/administrador/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin: **/usr/bin** :/sbin:/bin:/usr/games:/usr/local/games:/snap/bin  
administrador@administrador-desktop:/usr/bin$

but, even inside the directory ~usr/bin the command cmake didn’t function:

administrador@administrador-desktop:/usr/bin$ **cmake**  
Usage

cmake [options]   
cmake [options]   
cmake [options] -S -B

Specify a source directory to (re-)generate a build system for it in the  
current working directory. Specify an existing build directory to  
re-generate its build system.

Run ‘cmake --help’ for more information.

but it stays there:

administrador@administrador-desktop:/usr/bin$ **ls**  **-lag cmake**

-rwxr-xr-x 1 root 8309336 abr 9 17:09 cmake

Thank you, once more, by an advice.

Wilmar.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [April 14, 2020, 2:46pm UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997/20 "2020-04-14T14:46:17Z")

</div>

It looks like it’s working. The fact that it’s showing usage information means that CMake is installed, and you are running it successfully. The problem is that you haven’t given it a source or binary directory. `cmake` is a command-line tool meant to take an argument. If you want a more graphical solution, you will need to install `cmake-qt-gui` and then run `cmake-gui`.

[Next page](https://discourse.cmake.org/t/install-cmake-on-mint/997.md?page=2)
