【发布时间】:2015-12-16 05:04:46
【问题描述】:
我在 Elixir 项目中尝试使用 Erlang 库时遇到了一个小问题。
有问题的库是用于 ISO-8583 消息打包和解包的erl8583。
我找到了erl8583 的 github 存储库,并将我的 mix.exs 调整为以下内容:
defmodule Iso.Mixfile do
use Mix.Project
def project do
[app: :iso,
version: "0.0.1",
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
def application do
[applications: [:logger]]
end
defp deps do
[{:erl8583, github: "mgwidmann/erl8583"}]
end
end
当我运行mix deps.get 和mix deps.compile 时,它运行平稳。
然后,我尝试使用iex -S mix 启动 IEx 会话,并收到以下错误:
Unchecked dependencies for environment dev:
* erl8583 (git://github.com/mgwidmann/erl8583.git)
could not find an app file at _build/dev/lib/erl8583/ebin/erl8583.app. This may happen if the dependency was not yet compiled, or you specified the wrong application name in your deps, or the dependency indeed has no app file (then you can pass app: false as option)
** (Mix) Can't continue due to errors on dependencies
上面写着could not find an app file at _build/dev/lib/erl8583/ebin/erl8583.app。据我了解,mix 应该刚刚从 deps/erl8583/src 获取该文件并将其包含在其中(该文件存在,我检查过)。
我尝试手动将文件从deps 复制到_build,但没有成功。我做错了什么?
【问题讨论】:
标签: elixir