Score:0

how to install the cmake with specific version on WSL ubuntu 20.04

jp flag

I am currently trying to link my CLion to WSL, but CLion only supported the Cmake of version 3.20.x, not the latest version, so I wonder how to downgrade my Cmake (version 3.21.3) to 3.20.x on Ubuntu

thanks for helping!

Score:1
cn flag

Your question didn't say so, but the version (3.21.3) suggests that you are using the Snap package of cmake (not a deb package).

Here's the output of snap info cmake, edited for clarity:

[...]
channels:
  latest/stable:    3.21.3                 2021-09-21 (936) 116MB classic
  [...]                                            
  3.21/stable:      3.21.3                 2021-09-21 (936) 116MB classic
  [...]                                             
  3.20/stable:      3.20.6                 2021-09-21 (930) 115MB classic
  [...]

This tells us that you are likely using the latest/stable channel, which currently provides version 3.21.3. Version 3.20.6 is available on a different channel (the 3.20/stable channel).

  • At the moment, you cannot use multiple channels simultaneously: Installing B will remove A.

You should be able to install the 3.20.x version using:

sudo snap refresh cmake --channel=3.20/stable

And then you can return to latest using:

sudo snap refresh cmake --channel=latest/stable
LuCC avatar
jp flag
it works!! thanks
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.