Can't install Exercism CLI on Linux

Hi There! After downloading and extracting the archive, I followed the instructions but I can’t proceed beyond the second step. This error appear file or directory doesn’t exists.

I’m guessing ~/bin is not in your PATH. (echo $PATH to check.)

Fix this by adding the following line to your bashrc (assuming your shell is bash, might be different for other shells like fish):

export PATH="$HOME/bin:$PATH"

Edit: And then it’s best to logout and login.

I think maybe the issue is even simpler here. It looks like you’re not in the directory that you’ve unarchived to.

1 Like

Yes you are right! I opened the terminal in the wrong path. I opened the folder directly in the terminal by right clicking in the folder, then I was able to follow all the instructions and completed the installation. I guess I’ll have to study the command line more thoroughly… :sweat_smile:

1 Like

Well solved! :slight_smile:

Another solution. Create a link from /usr/local/bin/exercism to wherever the actual exercism executable is that’s convenient for you.
image

That still requires you ensure the directory is in the PATH and that’s not a given for /usr/local/bin :smile:

1 Like

Introduction to the alternatives command in Linux

/usr/local/bin will be in your path. It has a higher priority /usr/bin
It’s there for precisely these customisations. Been this way for many decades on most distros.

Possibly be default for new users or suchlike. But it won’t be in my PATH since /usr/local/bin in my system is empty :smile:

I’m saying that’s where you COULD put the exercism executable or a link to it as a possible solution. It’s what I did. No editing of PATH necessary.

Why would a directory being empty mean it’s not in your PATH?