(Mix) Could not compile dependency :mimerl, "/home/ubuntu/.mix/rebar3
bare compile --paths "/var/www/qserv/elixirbackend/_build/dev/lib/*/ebin""
command failed. You can recompile this dependency with "mix deps.compile mimerl",
update it with "mix deps.update mimerl" or clean it with "mix deps.clean mimerl"
I am getting this error on my server. Everything was working perfectly fine but after restarting my server, started facing the above mentioned issue.
~$ /home/ubuntu/.mix/rebar3 bare compile --paths “/var/www/qserv/elixir-backend/_build/dev/lib/*/ebin”
escript: exception error: no match of right hand side value undefined
in function rebar_log:log/3 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_log.erl, line 94)
in call from rebar3:handle_error/1 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl, line 314)
in call from escript:run/2 (escript.erl, line 759)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
So if you google the error “Getting error Could not compile dependency :mimerl” it shows a few responses where the compilation of that thing failed because of network issue. Either a misconfigured proxy or some other problem with downloading stuff.
I honestly am puzzled as the above do not give much information on what precisely fails during compilation.
The Makefile for this library downloads the mime database from external URL, which might fail, it also requires you have wget tool in the system.
Can you check that:
wget - is a command that is found. If not, install this Linux tool.
You can fetch with wget the following file: http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
REBAR_DEBUG=1 mix deps.compile
==> base64url (compile)
Could not find "rebar3", which is needed to build dependency :mimerl
I can install a local copy which is just used by Mix
Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn]
/home/ubuntu/.mix/rebar already exists, overwrite? [Yn]
* creating /home/ubuntu/.mix/rebar
/home/ubuntu/.mix/rebar3 already exists, overwrite? [Yn]
** (File.Error) could not write to file “/home/ubuntu/.mix/rebar3”: illegal operation on a directory
(elixir) lib/file.ex:934: File.write!/3
(mix) lib/mix/tasks/local.rebar.ex:74: Mix.Tasks.Local.Rebar.install_from_path/3
(mix) lib/mix/tasks/deps.compile.ex:226: Mix.Tasks.Deps.Compile.handle_rebar_not_found/1
(mix) lib/mix/tasks/deps.compile.ex:188: Mix.Tasks.Deps.Compile.do_rebar3/2
(mix) lib/mix/tasks/deps.compile.ex:85: anonymous fn/4 in Mix.Tasks.Deps.Compile.compile/2
(elixir) lib/enum.ex:1294: Enum.“-map/2-lists^map/1-0-”/2
(elixir) lib/enum.ex:1294: Enum.“-map/2-lists^map/1-0-”/2
(mix) lib/mix/tasks/deps.compile.ex:65: Mix.Tasks.Deps.Compile.compile/2
When you do ls -lh ${HOME}/.mix | grep rebar what is the output you get?
From what I have seen in the last two posts, I guess you have some rebar3 binary there that you do not own/have not the proper rights to execute and or overwrite it.
Gotcha… Not only its owned by root, its a directory as well… Before running the following commands, make sure that you do not have any important data left in that folder!
escript: exception error: no match of right hand side value undefined
in function rebar_log:log/3 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_log.erl, line 94)
in call from rebar3:handle_error/1 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl, line 314)
in call from escript:run/2 (escript.erl, line 759)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
** (Mix) Could not compile dependency :mimerl, “/home/ubuntu/.mix/rebar3 bare compile --paths “/var/www/qserv/elixir-backend/_build/dev/lib/*/ebin”” command failed. You can recompile this dependency with “mix deps.compile mimerl”, update it with “mix deps.update mimerl” or clean it with “mix deps.clean mimerl”