我正在尝试将Rabbitmq与phoenix结合使用,但在依赖项解析方面遇到一些问题。
[
{:phoenix, "~> 1.3.4"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_html, "~> 2.10"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:plug_cowboy, "~> 1.0"},
{:jason, "~> 1.1"},
{:cowboy, "~> 1.0.4"},
{:distillery, "~> 2.0", warn_missing: false},
{:edeliver, ">= 1.6.0"},
{:ranch_proxy_protocol, "~> 2.0", override: true},
{:amqp, "~> 1.1"}
]
我遇到以下错误
Running dependency resolution...
Failed to use "ranch" (version 1.7.1) because
cowboy (version 1.0.4) requires ~> 1.0
ranch_proxy_protocol (version 2.0.0) requires 1.5.0
mix.lock specifies 1.7.1
Failed to use "ranch" (version 1.7.1) because
cowboy (version 1.0.4) requires ~> 1.0
ranch_proxy_protocol (version 2.1.0) requires 1.6.1
mix.lock specifies 1.7.1
Failed to use "ranch" (version 1.7.1) because
cowboy (version 1.0.4) requires ~> 1.0
ranch_proxy_protocol (version 2.1.1) requires 1.6.2
mix.lock specifies 1.7.1
然后我尝试通过在部门中添加{:ranch, “~> 1.0”, override: true}
来解决该问题
然后解决了依赖性,但应用程序编译失败了。
** (Mix) Could not compile dependency :ranch_proxy_protocol, "/Users/ok/.mix/rebar3 bare compile --paths "/{my_application_path}/rmq/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile ranch_proxy_protocol", update it with "mix deps.update ranch_proxy_protocol" or clean it with "mix deps.clean ranch_proxy_protocol"