Compilation 混合编译过程的库路径

Compilation 混合编译过程的库路径,compilation,erlang,elixir,elixir-mix,Compilation,Erlang,Elixir,Elixir Mix,从brew转到Elixir和Erlang的asdf版本控制工具后,我仍然无法编译我的旧项目:在编译过程中,它试图引用不存在的brew Cell lib文件: MacBook-Pro% mix test ==> gettext Compiling 1 file (.erl) /usr/local/Cellar/erlang/21.3.2/lib/erlang/lib/parsetools-2.1.8/include/yeccpre.hrl:59: illegal pattern /usr/l

从brew转到Elixir和Erlang的asdf版本控制工具后,我仍然无法编译我的旧项目:在编译过程中,它试图引用不存在的brew Cell lib文件:

MacBook-Pro% mix test
==> gettext
Compiling 1 file (.erl)
/usr/local/Cellar/erlang/21.3.2/lib/erlang/lib/parsetools-2.1.8/include/yeccpre.hrl:59: illegal pattern
/usr/local/Cellar/erlang/21.3.2/lib/erlang/lib/parsetools-2.1.8/include/yeccpre.hrl:60: variable 'Error' is unbound
/usr/local/Cellar/erlang/21.3.2/lib/erlang/lib/parsetools-2.1.8/include/yeccpre.hrl:60: variable 'Stacktrace' is unbound
/usr/local/Cellar/erlang/21.3.2/lib/erlang/lib/parsetools-2.1.8/include/yeccpre.hrl:63: variable 'Stacktrace' unsafe in 'try' (line 60)
/usr/local/Cellar/erlang/21.3.2/lib/erlang/lib/parsetools-2.1.8/include/yeccpre.hrl:64: variable 'Error' unsafe in 'try' (line 60)
/usr/local/Cellar/erlang/21.3.2/lib/erlang/lib/parsetools-2.1.8/include/yeccpre.hrl:64: variable 'Stacktrace' unsafe in 'try' (line 60)
could not compile dependency :gettext, "mix compile" failed. You can recompile this dependency with "mix deps.compile gettext", update it with "mix deps.update gettext" or clean it with "mix deps.clean gettext"
即使没有任何
/usr/local/ceral/erlang
文件夹


混合从何处获取到外部erlang libs的路径,以及如何将其更改为使用asdf的捆绑包?

erlang,以及Elixir使用
$PATH
环境变量中的二进制文件和libs,如下所述:

asdf通常在
$PATH
的末尾加载,这意味着如果您仍然通过brew安装了Erlang和Elixir,则将首先加载它。也就是说,请仔细检查是否通过brew安装了任何其他Erlang版本。您可以使用命令
brew uninstall erlang--force卸载所有版本

还可以使用以下命令在项目的根目录中设置本地Erlang和Elixir版本:

asdf本地erlang 21.3.2
asdf本地长生不老药1.8.1-otp-21
根据您的环境更改版本

最后,使用命令
asdf current
检查asdf是否加载了正确的版本。它应该显示如下内容:

elixir         1.8.1-otp-21 (set by /path/to/project/.tool-versions)
erlang         21.3.2   (set by /path/to/project/.tool-versions)

万不得已,请退出。

请在此处的链接中添加相关部分。