简体   繁体   English

无法使用命令行Elixir混合(macOS High Sierra)

[英]Cannot use command line Elixir mix (macOS High Sierra)

When i run command elixir -v or mix , it will return: 当我运行命令elixir -vmix ,它将返回:

{"init terminating in do_boot",{undef,[{elixir,start_cli,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}

Crash dump is being written to: erl_crash.dump...done
init terminating in do_boot ()

Some details: 一些细节:

$ brew list
elixir erlang ... elixir erlang ...

$ erl
Erlang/OTP 19 [erts-8.0] [source-6dc93c1] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] Eshell V8.0 (abort with ^G) 1> Erlang/OTP 19 [erts-8.0] [source-6dc93c1] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] Eshell V8.0 (abort with ^G) 1>

$ elixir
Usage: elixir [options] [.exs file] [data] -e COMMAND Evaluates the given command (*) -r FILE Requires the given files/patterns (*) ... Usage: elixir [options] [.exs file] [data] -e COMMAND Evaluates the given command (*) -r FILE Requires the given files/patterns (*) ...

I have used brew uninstall, reinstall, but nothing change. 我已经使用brew卸载,重新安装,但是没有任何变化。 Please help me fix it! 请帮我解决!

erl without any arguments will run Erlang shell. 没有任何参数的erl将运行Erlang shell。 But if you want to run Elixir shell you should try running iex (interactive elixir). 但是,如果您要运行Elixir Shell ,则应尝试运行iex (交互式Elixir )。 elixir is used to run programs you already coded, like elixir simple.exs elixir用于运行您已经编码的程序 ,例如elixir simple.exs

Or it might be that your Erlang version is little out of date. 或者可能是您的Erlang版本已经过时。 Try running brew update . 尝试运行brew update

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM