3

Fast summery:

Installed Erlang/Elixir using asdf in Debian 11. Getting 'mix command not found' errors.

Tried:

    export PATH=$PATH:/usr/local/lib/elixir/1.13.2-otp-24/bin
  • Checked ~./bashrc path is referenced:
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
  • Checked that Erlang & Elixir installed using erl -v & elixir -v. They're installed.

Any ideas?

More details for context:

Script I'm using to install:

# Install asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.3
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc 
source ~/.bashrc

# Install dependencies
sudo apt update
sudo apt install -y build-essential libncurses5-dev libssl-dev 

# Install Erlang
sudo apt-get update && sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils openjdk-17-jdk openssl libssl-dev
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git 
asdf install erlang 24.2.1 

# Install Elixir
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git 
asdf install elixir 1.13.2-otp-24 

# Install Node.js
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git 
asdf install nodejs 16.13.2 

# resource
source ~/.bashrc

Edit: More details:

Installing elixir without using asdf it works.

sudo apt-get -y install elixir

The problem is I need to install a specific version.

sudo apt-get -y install elixir=1.13.2-otp-24

...gives error 'Version was not found'

So the problem must have something to do with asdf.

5
  • “Checked ~./bashsc path is referenced” is a typo or the typo? sr. Commented Apr 12, 2023 at 15:26
  • It was a typo. Fixed. Commented Apr 12, 2023 at 15:31
  • What does the ps -p $$ command return in your shell? Commented Apr 12, 2023 at 19:04
  • PID TTY TIME CMD 2222 pts/5 00:00:00 bash Commented Apr 12, 2023 at 19:41
  • What bugs me is export PATH=$PATH:/usr/local/lib/elixir/1.13.2-otp-24/bin, asdf does not install anything to /usr/local/ AFAICT. If which elixir returns /usr/local, make sure you do not have any non-asdf-managed version of elixir installed. Commented Apr 13, 2023 at 3:42

1 Answer 1

0

I think you should remove this: /usr/local/lib/elixir/1.13.2-otp-24/bin from your PATH, and run asdf global:

  • asdf global erlang 24.2.1
  • asdf global elixir 1.13.2-otp-24
  • asdf global nodejs 16.13.2
Sign up to request clarification or add additional context in comments.

1 Comment

I gave it a try. Problem persists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.