That’s not working.
If install outside of asdf using command: sudo apt-get install elixir
The mix command then works.
Problem is I need to install a specific version.
Is there a way to do that without using asdf?
asdf maintainer here. There couple that could be causing this. If what @massimo said did not work, I’d suggest re-reading the asdf getting started guide (Getting Started | asdf) and make sure you follow the instructions for your operating system and interactive shell.
If you do all that and it still doesn’t work, it means there something else interfering with asdf in your shell. I’ve found the following commands to be helpful when debugging versions installed with asdf:
type -a mix
type -a elixir
Both of these commands should print out a one or more paths to mix and elixir executables on your machine. If things are working properly you should see the asdf shim paths listed first ($HOME/.asdf/shims/mix and $HOME/.asdf/shims/elixir).
Navigate to your home directory by running the following command: cd ~
Check if the .tool-versions file exists by running ls -a. If it doesn’t exist, create it by running touch .tool-versions.
Open the .tool-versions file with a text editor of your choice. For example, you can use the following command to open it with nano: nano .tool-versions
Add the following line to the file: elixir 1.13.2-otp-24.
Save the changes and exit the text editor.
To check the current version of Elixir:
Open a terminal window.
Run the following command: elixir -v.
This will display the version of Elixir that is currently set on your system. If you’ve followed the steps above and set the version to 1.13.2-otp-24, then running elixir -v should display that version.
Then something super weird is going on, likely permission issues. We can’t help much if basic system expectations don’t hold up. She should troubleshoot and pursue. What’s even weirder is that just some file in the homedir made the whole thing work.
But can’t fault her really, especially if something you thought trivial wasted you a lot of time you’ll just be happy that you found a solution that worked eventually.