Pre-compilled Elixir package mix errors

Decided to give openSUSE a spin after a couple of years of not using it (it’s really sweet, by the way) and everything was working nice and smooth until I had to install Elixir. I had no problems installing Erlang from the tumbleweed repositories, but Elixir decided not to work whatsoever.

So I decided that the pre-compilled version might be a better solution, downloaded it, added the path in .bashrc and it works… kinda.

iex works as expected, but mix doesn’t seem to.
This is the error that I’m prompted with when I try to run mix:

** (UndefinedFunctionError) function Mix.start/0 is undefined (module Mix is not available)
    Mix.start()
    elixir/bin/mix:2: (file)
    (elixir) lib/code.ex:370: Code.require_file/2

Any clues? Thanks!

So to clarify, according to the instructions, you did the following:

zypper ar -f http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_Factory/ erlang
zypper in elixir

…and it didn’t work?

Yes, uninstalled the package afterwards and proceeded to get the pre-compiled version.

If the Erlang package installed just fine, that part shouldn’t be a problem at least.

Have you tried installing Elixir using either asdf + asdf-elixir or kiex? Those provide, if nothing else, a well-tested, standardized way of compiling Elixir (or fetching pre-compiled packages where available).

I found the problem.

When you run

zypper ar -f http://download.opensuse.org/repositories/devel:/languages:/erlang/openSUSE_Factory/ erlang
zypper in elixir

Extra packages packages such as iex, mix, ecto, etc; do not get installed.
I thought they did, but it seems they do not. All I had to do is use YaST’s Software Management tool and pick the missing packages.

Thanks for the help @jwarlander

Wow, that’s a really weird package split! :slight_smile: In Ubuntu, it’s all wrapped up in the ‘elixir’ package.