Bcrypt_elixir compiling issue on ubuntu 18

Hey I am trying to run mix release on my ubuntu vps and I am getting this error:

==> bcrypt_elixir
could not compile dependency :bcrypt_elixir, "mix compile" failed. You can recompile
this dependency with "mix deps.compile bcrypt_elixir", update it with "mix deps.update bcrypt_elixir" or clean it with "mix deps.clean bcrypt_elixir"
==> user_restfulapi_phx
** (Mix) "make" not found in the path. If you have set the MAKE environment variable,please make sure it is correct.

my elixir and erlang versions are:

Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

IEx 1.7.0 (compiled with Erlang/OTP 20)

I tried installing an older version of erlang but got the same error

:wave:

According to the error, make is not found on your system.

On ubuntu, try sudo apt install make or sudo apt install --reinstall make if it’s already installed but missing from the PATH.

(Mix.Releases.Config.LoadError) could not load release config rel/config.exs
    ** (UndefinedFunctionError) function Mix.Config.Agent.start_link/0 is undefined (module Mix.Config.Agent is not available)
    Mix.Config.Agent.start_link()
    (stdlib) erl_eval.erl:677: :erl_eval.do_apply/6
    (stdlib) erl_eval.erl:446: :erl_eval.expr/5
    (stdlib) erl_eval.erl:126: :erl_eval.exprs/5
    (elixir) lib/code.ex:232: Code.eval_string/3
    (distillery) lib/mix/lib/releases/config/config.ex:281: Mix.Releases.Config.read_string!/1
    (distillery) lib/mix/lib/releases/config/config.ex:302: Mix.Releases.Config.read!/1
    (distillery) lib/mix/lib/releases/config/config.ex:54: Mix.Releases.Config.get/1
    (distillery) lib/distillery/tasks/release.ex:77: Mix.Tasks.Release.run/1
    (mix) lib/mix/task.ex:316: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2
    (elixir) lib/code.ex:767: Code.require_file/2

now i have this :thinking:

Using distillery and latest Elixir?

If so, you will want to update your distillery dependency to either git master or one of the 2.0 rc’s as it has a fix for this.

2 Likes

:frowning:

Seems similar to https://github.com/bitwalker/distillery/issues/431.

1 Like

using the latest rc release fixed it :smile:

I had a similar problem but with the erlang version and the c compiler, installing both did not do much, but reducing the :bcrypt_elixir version to 0.12 stooped the compilation errors.

This works. I did

sudo apt install make

and then was prompted to install additional dependencies.

** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".

Once I did sudo apt install build-essential then everything works fine.

5 Likes