#Installation Fresh installation fails on locale?

I tried to install a fresh Mobilizon installation on a Debian machine.

I followed the steps on https://docs.joinmobilizon.org/administration/ but ran into a few dependencies issues:

  • Compilation of argon2_elixir requires Make and GCC. Easy to correct by installing the build-essential package on Debian.
  • Compilation of fast_html requires CMake. Easy to correct by installing the cmake package on Debian.

So far, so good. But now compilation is failing on ex_cldr_numbers. Full error message is:

== Compilation error in file lib/cldr/number/parse.ex ==
** (FunctionClauseError) no function clause matching in Keyword.get/3    
    
    The following arguments were given to Keyword.get/3:
    
        # 1
        nil
    
        # 2
        :vsn
    
        # 3
        nil
    
    Attempted function clauses (showing 1 out of 1):
    
        def get(keywords, key, default) when is_list(keywords) and is_atom(key)
    
    (elixir 1.10.4) lib/keyword.ex:201: Keyword.get/3
    lib/cldr/number/parse.ex:169: (module)
    (stdlib 3.13.2) erl_eval.erl:680: :erl_eval.do_apply/6

Judging from https://github.com/elixir-cldr/cldr/issues/38 who had a similar error and the fact that CLDR manages locales, I’m guessing there’s something wrong with my locale on my Debian machine.

Line 169 of the parse.ex file says:

decimal_version = Keyword.get(Application.spec(:decimal), :vsn) |> List.to_string

If I type locale in the command prompt, I get the following:

LANG=en_CA.UTF-8
LANGUAGE=
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY=en_CA.UTF-8
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_ADDRESS=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_ALL=

So I guess compilation dies because there is something wrong with my locale. Any idea what could it be and how I could fix it?

Hi, and thank you for wanting to install Mobilizon !

Did you follow this page mentioning the list of dependencies as well ?
Since you encountered issues previously, you may clear the compiled dependencies just in case of conflicts : MIX_ENV=prod mix clean --deps and start compilation again.
It seems the cldr Elixir library requires the decimal library here, but I guess there was a mix-up.

For reference, my own locale configuration on a Mobilizon instance:

LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

Oh dear, I didn’t see all the dependencies on the other page. I thought that page was just a guide on how to install the dependencies mentioned in the first page. I should’ve been more careful.

Anyway, I didn’t install any other dependencies yet. I did the trick you suggested:

MIX_ENV=prod mix clean --deps

And then

MIX_ENV=prod mix compile

And it managed to compile successfully. So thanks for the help!

I’ll install the missing dependencies before I got further into the configuration.