我有一个小的 Elixir 应用程序,它使用feeder_ex来解析 XML。在开发中一切正常,但是当我用distillery构建我的版本时,我开始收到unavailable xmerl module
错误。
我通过将xmerl
应用程序添加到我的 mix.exs 下的应用程序列表来解决它。但这对我来说没有意义,因为我已经有了feeder_ex
我的应用程序列表。并且feeder_ex
必须feeder
对他的申请清单有xmerl
对他的申请清单。
那么为什么我必须在我自己的应用程序列表中再声明一次呢?
更新 - 添加 Erlang 版本/命令结果
xmerl =>
iex(3)> i :xmerl
Term
:xmerl
Data type
Atom
Module bytecode
/home/awea/.asdf/installs/erlang/19.3/lib/erlang/lib/xmerl-1.3.13 /ebin/xmerl.beam
错误 =>
erl
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
更新 - 添加 Linux 版本,vm.args
我使用 ubuntu 16.04 和 distillery 1.5.2。这是我的vm.args
文件:
#### Generated - edit/create /var/apps/vigil/vm.args instead.
## Name of the node
-name vigil@127.0.0.1
## Cookie for distributed erlang
-setcookie -
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
## (Disabled by default..use with caution!)
##-heart
## Enable kernel poll and a few async threads
##+K true
##+A 5
## Increase number of concurrent ports/sockets
##-env ERL_MAX_PORTS 4096
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
# Enable SMP automatically based on availability
-smp auto
更新 - 添加应用程序列表
def application do
[mod: {Vigil, []},
extra_applications: [
:logger, :xmerl
]
]
end