Struggling all to install Erlang, Elixir and Phoenix on redhat linux 7

By the way this is the result after the elixir compilation:

rm -rf ebin
rm -rf lib//ebin
rm -rf lib/elixir/src/elixir_parser.erl
make[1]: Entering directory ‘/opt/elixir’
rm -rf lib/
/_build/
rm -rf lib/*/tmp/
rm -rf lib/elixir/test/ebin/
rm -rf lib/mix/test/fixtures/deps_on_git_repo/
rm -rf lib/mix/test/fixtures/git_rebar/
rm -rf lib/mix/test/fixtures/git_repo/
rm -rf lib/mix/test/fixtures/git_sparse_repo/
rm -f erl_crash.dump
make[2]: Entering directory ‘/opt/elixir’
rm -f man/elixir.1
rm -f man/elixir.1.bak
rm -f man/iex.1
rm -f man/iex.1.bak
make[2]: Leaving directory ‘/opt/elixir’
make[1]: Leaving directory ‘/opt/elixir’
Recompile: src/elixir_utils
Recompile: src/elixir_tokenizer
Recompile: src/elixir_sup
Recompile: src/elixir_rewrite
Recompile: src/elixir_quote
Recompile: src/elixir_parser
Recompile: src/elixir_overridable
Recompile: src/elixir_module
Recompile: src/elixir_map
Recompile: src/elixir_locals
Recompile: src/elixir_lexical
Recompile: src/elixir_interpolation
Recompile: src/elixir_import
Recompile: src/elixir_fn
Recompile: src/elixir_expand
Recompile: src/elixir_errors
Recompile: src/elixir_erl_var
Recompile: src/elixir_erl_try
Recompile: src/elixir_erl_pass
Recompile: src/elixir_erl_for
Recompile: src/elixir_erl_compiler
Recompile: src/elixir_erl_clauses
Recompile: src/elixir_erl
Recompile: src/elixir_env
Recompile: src/elixir_dispatch
Recompile: src/elixir_def
Recompile: src/elixir_config
Recompile: src/elixir_compiler
Recompile: src/elixir_code_server
Recompile: src/elixir_clauses
Recompile: src/elixir_bootstrap
Recompile: src/elixir_bitstring
Recompile: src/elixir_aliases
Recompile: src/elixir
Generated elixir.app
==> bootstrap (compile)
Compiled lib/elixir/lib/kernel.ex
Compiled lib/elixir/lib/macro/env.ex
Compiled lib/elixir/lib/keyword.ex
Compiled lib/elixir/lib/module.ex
Compiled lib/elixir/lib/list.ex
Compiled lib/elixir/lib/macro.ex
Compiled lib/elixir/lib/kernel/typespec.ex
Compiled lib/elixir/lib/code.ex
Compiled lib/elixir/lib/code/identifier.ex
Compiled lib/elixir/lib/module/checker.ex
Compiled lib/elixir/lib/module/locals_tracker.ex
Compiled lib/elixir/lib/module/parallel_checker.ex
Compiled lib/elixir/lib/module/types/helpers.ex
Compiled lib/elixir/lib/module/types/infer.ex
Compiled lib/elixir/lib/module/types.ex
Compiled lib/elixir/lib/kernel/utils.ex
Compiled lib/elixir/lib/exception.ex
Compiled lib/elixir/lib/protocol.ex
Compiled lib/elixir/lib/stream/reducers.ex
Compiled lib/elixir/lib/enum.ex
Compiled lib/elixir/lib/map.ex
Compiled lib/elixir/lib/inspect/algebra.ex
Compiled lib/elixir/lib/inspect.ex
Compiled lib/elixir/lib/access.ex
Compiled lib/elixir/lib/range.ex
Compiled lib/elixir/lib/regex.ex
Compiled lib/elixir/lib/string.ex
Compiled lib/elixir/lib/string/chars.ex
Compiled lib/elixir/lib/io.ex
Compiled lib/elixir/lib/path.ex
Compiled lib/elixir/lib/file.ex
Compiled lib/elixir/lib/system.ex
Compiled lib/elixir/lib/kernel/cli.ex
Compiled lib/elixir/lib/kernel/error_handler.ex
Compiled lib/elixir/lib/kernel/parallel_compiler.ex
Compiled lib/elixir/lib/kernel/lexical_tracker.ex
make[1]: Entering directory ‘/opt/elixir’
==> unicode (compile)
Compiling /opt/elixir/lib/elixir/unicode/unicode.ex (it’s taking more than 15s)
make[1]: Leaving directory ‘/opt/elixir’
==> elixir (compile)
make[1]: Entering directory ‘/opt/elixir’
Generated elixir.app
make[1]: Leaving directory ‘/opt/elixir’
==> eex (compile)
==> mix (compile)
Generated mix app
==> ex_unit (compile)
Generated ex_unit app
==> logger (compile)
Generated logger app
Generated eex app
==> iex (compile)
Generated iex app
==> elixir (eunit)
All 190 tests passed.

==> elixir (ex_unit)
warning: :dialyzer.format_warning/1 is undefined (module :dialyzer is not available or is yet to be defined)
test/elixir/kernel/dialyzer_test.exs:165: Kernel.DialyzerTest.assert_dialyze_no_warnings!/1

warning: :dialyzer.run/1 is undefined (module :dialyzer is not available or is yet to be defined)
test/elixir/kernel/dialyzer_test.exs:172: Kernel.DialyzerTest.dialyzer_run/1

Excluding tags: [windows: true]

…???

  1. Kernel.DialyzerTest: failure on setup_all callback, all tests have been invalidated
    ** (UndefinedFunctionError) function :dialyzer.run/1 is undefined (module :dialyzer is not available)
    stacktrace:
    :dialyzer.run([analysis_type: :plt_build, output_plt: ‘/opt/elixir/lib/elixir/tmp/dialyzer/base_plt’, apps: [:erts], files: [’/opt/elixir/bin/…/lib/elixir/ebin/elixir.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/elixir_env.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/Elixir.Atom.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/Elixir.Enum.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/Elixir.Exception.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/Elixir.Kernel.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/Elixir.Macro.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/Elixir.Macro.Env.beam’, ‘/opt/elixir/bin/…/lib/elixir/ebin/Elixir.String.beam’]])
    test/elixir/kernel/dialyzer_test.exs:172: Kernel.DialyzerTest.dialyzer_run/1
    test/elixir/kernel/dialyzer_test.exs:27: Kernel.DialyzerTest.__ex_unit_setup_all_0/1
    test/elixir/kernel/dialyzer_test.exs:3: Kernel.DialyzerTest.ex_unit/2

Finished in 43.9 seconds (31.3s on load, 12.6s on tests)
1553 doctests, 3362 tests, 0 failures, 7 excluded, 15 invalid

Randomized with seed 341182
make: *** [Makefile:272: test_stdlib] Error 1

Stop running the tests, just compile elixir.

Clone it as a regular user, change into the folder, checkout the version you want to install via git checkout $tag, then run make and sudo make install. It should install itself in a way that you do not need to alter the PATH.

1 Like

Done and it seems to be working

Now I am following
https://hexdocs.pm/phoenix/installation.html#content
to install Phoenix which will take me a while since I also have to install Postgres

NO support for MySQL ?

There are drivers available for MySQL, nur PostgreSQL ist the preferred database, that’s why most tutorials use it.

I followed the instruction on https://afreshcloud.com/programming-elixir/installing-elixir-on-centos-7 to install elixir on my Redhat 7 Linux box.

This is a very relevant information, that in my opinion you could have included in your initial topic.

Why?

Because it could be one of the causes of your issues in your installation, specially if this proxy intercepts https requests, due to corporate policies.

Just a random blog post telling you how not to do it…

You never compile outside of a users folder, especially not in the folders “owned” by the system (meaning anything not /home, /tmp, /run, or explicitely owned by an application, but then you as a user still shouldn’t fiddle around with it.

If you really want to compile from source, then follow the official guide, which explicitely says to download a tarball from the github releases page, untar it and run make and sudo make install in it (though it could be more explicit about the latter part):

Next you should download source code (.zip, .tar.gz) of the latest release, unpack it and then run make inside the unpacked directory (note: if you are running on Windows, read this page on setting up your environment for compiling Elixir).

What it does though, is to explicitely mention, that compiling from master is only for the adventourus people.

First of all thank you very much for the patience: I now have a stable and clear installation procedure that I could replicate without any issue.

Erlang, Elixir and Phoenix are installed

Made my first app and now dealing with PostgreSQL and MySQL since I want to be able to work with both and check how (hope) simple is to go ffrom one to another with the same Phx app!