2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Elixirのrelxがcan't find include libになるのを治す

Last updated at Posted at 2016-12-29

#Elixirのrelxがcan't find include libになるのを治す

リリースビルドとか調べててexrm入れて$ mix compileしたら

===> Compiling relx
===> Compiling src/rlx_topo.erl failed
include/relx.hrl:18: can't find include lib "erlware_commons/include/ec_cmd_log.hrl"
include/relx.hrl:19: can't find include lib "providers/include/providers.hrl"

とか言われてしまった...

exrmを使うときに必要なrelxの依存関係がおかしいのか他に必要な物が入っていないようだ

何が必要なのかと調べたら答えがあった

上記のrebar.configに

rebar.config
{deps, [{erlware_commons, "0.22.0"},
        {providers, "1.6.0"},
        {getopt, "0.8.2"},
        {cf, "0.2.2"},
        {bbmustache, "1.0.4"}
       ]}.

と書いてあるので下記の物が必要なようだ

erlware_commons : https://hex.pm/packages/erlware_commons
providers : https://hex.pm/packages/providers
getopt : https://hex.pm/packages/getopt
cf : https://hex.pm/packages/cf
bbmustache : https://hex.pm/packages/bbmustache/1.0.1

最終的にmix.exsはこうなった(かなり削ってます)

mix.exs
def application do
    [mod: {PhoenixChat, []},
     applications: [:erlware_commons, :providers, :getopt, :cf, :bbmustache]]
     #Phoenixの残骸ありますが気にしないで()
end

defp deps do
    [{:exrm, "~> 1.0"}, #ここを {:relx, "~> 3.22"} にすればexrmじゃなくてrelx単体で入る
     {:erlware_commons, "~> 0.22.0"},
     {:providers, "~> 1.6"},
     {:getopt, "~> 0.8.2"},
     {:cf, "~> 0.2.2"},
     {:bbmustache, "~> 1.0"}]
end

上記の物は古くなってるかもしれないので参考にする人は上記のhex.pmのリンクから最新のものを入れるようにしてください

2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?