3

I was trying to upgrade to elixir 1.7 (I currently have 1.6.0). I ran brew upgrade elixir in my terminal but it said Error: elixir not installed. And when I run elixir --version I'm getting this weird output:

=SUPERVISOR REPORT==== 27-Jul-2018::15:03:35.806956 ===
        supervisor: {local,'Elixir.Logger.Supervisor'}
    errorContext: start_error
    reason: noproc
    offender: [{pid,undefined},
               {id,'Elixir.Logger.ErrorHandler'},
               {mfargs,
                   {'Elixir.Logger.Watcher',start_link,
                       [{error_logger,'Elixir.Logger.ErrorHandler',
                            {true,false,500}}]}},
               {restart_type,permanent},
               {shutdown,5000},
               {child_type,worker}]
=CRASH REPORT==== 27-Jul-2018::15:03:35.806836 ===
  crasher:
    initial call: Elixir.Logger.Watcher:init/1
    pid: <0.88.0>
    registered_name: []
    exception exit: noproc
      in function  gen:do_for_proc/2 (gen.erl, line 228)
      in call from gen_event:rpc/2 (gen_event.erl, line 239)
      in call from 'Elixir.Logger.Watcher':init/1 (lib/logger/watcher.ex, line 23)
      in call from gen_server:init_it/2 (gen_server.erl, line 374)
      in call from gen_server:init_it/6 (gen_server.erl, line 342)
    ancestors: ['Elixir.Logger.Supervisor',<0.82.0>]
    message_queue_len: 0
    messages: []

(More crash reports here) ... and at the end:

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

Elixir 1.6.0 (compiled with OTP 19)

I'm not sure what's going on, now I can't even run my elixir programs.

2 Answers 2

1

It is not a good idea to use system-wide version of Elixir by all means. There are many version managers like asdf, exenv and others to manage different Elixir versions on your computer. I would suggest using any of them.

Answering your question. I have no idea about brew, but it looks like you are to start with cleaning up your box.

  1. downgrade Erlang to 20.0-
  2. uninstall Elixir 1.6
  3. upgrade Erlang to 21.0
  4. install the latest Elixir (I still suggest to do it with version manager, since that way you might have many different versions coexisting which might be useful sooner or later.)
0
1

I’m not sure what’s causing the error, but try brew reinstall elixir if you have a corrupted installation.

3
  • I've found that ERLANG/OTP v.21 is not compatible with Elixir 1.6.0, that's the reason for the weird error. The question persists, how to upgrade to elixir 1.7? Commented Jul 27, 2018 at 23:38
  • 1
    homebrew just upgraded elixir to 1.7.1 which you can install with the usual commands (install, reinstall, or upgrade). Commented Jul 29, 2018 at 6:39
  • 1
    Reinstalling the latest elixir from Linuxbrew will be the easiest way to upgrade.
    – jj1bdx
    Commented Jul 29, 2018 at 6:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.