我已经使用apt install elixir安装了灵丹妙药包,它没有报告错误。但是,当我运行elixir -v时,我会得到消息-bash: /usr/bin/elixir: No such file or directory。
我已经尝试过apt purge elixir,这也成功地完成了,但是在清除之后安装长生药并不能解决问题。
我正试图在Erlang模块中使用从Elixir源代码编译的束文件。当我运行Erlang节点时,它会引发错误,但是我可以直接使用来自Elixir的代码。
灵丹妙药模块:
defmodule Recursion do
def print_multiple_times(msg, n) when n <= 1 do
IO.puts msg
end
def print_multiple_times(msg, n) do
IO.puts msg
print_multiple_times(msg, n - 1)
end
end
Erlang模块:
-modul
根据RaspberryPI,我在上安装了Erlang和Elixir (我选择了Erlang19.0和Elixir1.3)。
然后,我创建了一个以elixir_ale作为依赖项的混合项目。当我试图运行该项目时,会收到以下错误消息:
Makefile:24: *** Could not find include directory for ei.h. Check that Erlang header files are available. Stop.
搜索ei.h显示它位于下面
怎样才能使gcc/mix的头文件可用?我试图将erlang文件夹的内容复制到/usr/ include /中,但这并
我想在生产环境中使用docker镜像来运行Phoenix容器,但是,由于Elixir只是Erlang之上的一层,因此在我的生产环境中运行Elixir可能是浪费空间。
理想情况下,我可以将整个Phoenix应用程序编译到Erlang中,然后使用erlang:alpine中的图像在生产环境中实际运行该应用程序。就像这样..。
FROM elixir:alpine as builder
(install dependencies and copy files)
RUN mix compile_app_to_erlang
FROM erlang:alpine
COPY --from=builder
这是我第一次使用该命令:
$ mix deps.get
下面是输出:
Could not find Hex, which is needed to build dependency :ecto
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn] Y
* creating /Users/7stud/.kiex/mix/archives/elixir-1.4.1/hex-0.18.1
Resolving Hex dependencies...
Dependency
当我运行命令elixir -v或mix时,它将返回:
{"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 ()
一些细节:
$ brew list
elixir erlang…$ erl
Erlang/OTP 19 [erts-8.0] [sou
在Elixir1.5中,我过去使用__info__函数,:exports原子作为kind参数。
在1.6中,:exports作为一个选项被删除。我查看了1.6的变更量,没有看到任何关于变化的提及。
# Used to work
MyModule.__info__(:exports)
现在该怎么做呢?
1.5Docs:
1.6Docs: