Exercism Gone But Still There? CLI Installation problems in WSL Windows 10 - Poltergeist?

Hello there!

I would really appreciate the support of someone who knows more about Linux (WSL) than I do.

I have tried and failed to move my Exercism Workouts to my local machine in WSL (Windows 10) several times.

I follow all the instructions on the website to perfect completion and without a glitch.

Then, when I am going to download the exercises, lo and behold, it seems as if exercism has disappeared from the WSL mind, even though it actually exists in the bin directory.

bigspaces@DESKTOP-7PTQE4B:~/bin$ ls
bigspaces@DESKTOP-7PTQE4B:~/bin$ exercism
internal error, please report: running "exercism" failed: cannot find installed snap "exercism" at revision 5: missing file /snap/exercism/5/meta/snap.yaml


Any support will be most appreciated.

You sure you installed the correct version?

As far as I know I did. 64bits linux system, following the steps of the Exercism guide.

Alright I did a quick rundown. I installed exercism on my laptop which runs windows(11) through wsl. It works fine. Are you sure you are using wsl 2? Also which version of windows 10 are you on?

To check which version of wsl you are running you can write into the powershell:

wsl -l -v

You should get something like this:

  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop-data    Stopped         2
  docker-desktop         Stopped         2

Without the docker part if you aren’t using docker.

This looks like a PATH issue to me.
Can you run ./exercism from the ~/bin directory?

Then can you check whether you got ~/bin in PATH? (run echo $PATH)

* Ubuntu Running 2

Thank you dreig. Did you look at the screenshot provided? It answers your question about running exercism from the bin directory.

Notice the dot and slash in front of exercism. Like so: ./exercism
Alternatively run ~/bin/exercism.
If the executable is not in PATH, you can run it by invoking the full path to the executable.

The first thing I notice here is the snap reference.

Remove ~/bin/exercism and do an uninstall for the snap installation of exercism.

Install the executable for Ubuntu instead, place it in a directory named ~/bin, ensure it has executable bit set, chmod +x ~/bin/exercism and restart the terminal, and you should be able to execute the exercism without any path reference needed (so no ~/bin/exercism as Ubuntu places this directory in the path if it exists.

Snap has been a problem, and hopefully we will be doing away with those instructions soon, as we are not maintaining this well. (I don’t want to blame Snap, it presumably is a fine system!)

1 Like

Hello Kotp

Thank you for your assistance. In the end, fate came to help. I managed to break my machine and now it is in maintenance (BIOS bricked. I conquered the everest of computer breaking abilities!).

So I reinstalled everything in a new machine. I have not yet installed exercism in the new machine, but I will in the next few days. You may hear from me again :slight_smile:

Appreciate your support.

Snap is not really supported in wsl. I know it got support in windows 11 for not too long ago (I have not got it to work on my windows 11 machine though) but I am unsure if it actually works on windows 10.

Thanks Meatball. The question would then be… what is the proper way to install Exercism in a Windows 10 machine within WSL? Everytime I follow the Exercism guide I end up in that situation :(

If you actually want I can jump into a call with you and help you step by step.(later today or whenever), since exercism doesn’t require snap. But snap with wsl isn’t a great combo unless you know exactly what you are doing (which I don’t).

I’d download the appropriate binary from the releases at Release exercism-v3.1.0 · exercism/cli · GitHub (you probably want exercism-3.1.0-linux-x86_64.tar.gz) and then put it somewhere on your path.

If you use Ubuntu as your WSL flavor, then ~/bin is the preferred path.

Ubuntu will, if and when that path exists, place it in your path automatically. And so having the executable there, with a chmod +x ~/bin/exerism to give it that executable bit, should allow you to execute it in your terminal under a shell such as bash.