'mix: command not found' 使用 asdf 安装 Erlang/Elixir 时出错

问题描述 投票:0回答:1

快夏:

在 Debian 11 中使用 asdf 安装了 Erlang/Elixir。 出现“找不到混合命令”错误。

试过:

    export PATH=$PATH:/usr/local/lib/elixir/1.13.2-otp-24/bin
  • 查到~./bashrc路径被引用:
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
  • 检查是否使用 erl -v & elixir -v 安装了 Erlang & Elixir。它们已安装。

有什么想法吗?

有关上下文的更多详细信息:

我用来安装的脚本:

# 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
erlang elixir debian-buster asdf
1个回答
0
投票

我认为你应该从你的路径中删除这个:

/usr/local/lib/elixir/1.13.2-otp-24/bin
,然后运行
asdf global

  • asdf global erlang 24.2.1
  • asdf global elixir 1.13.2-otp-24
  • asdf global nodejs 16.13.2
© www.soinside.com 2019 - 2024. All rights reserved.