bend

bend

I’m a beginner, using Linux MInt 18.3 Cinnamon. I installed elixir with apt, but it only found version 1.1, and I’d like to use the newest version, but I have been having trouble. From memory here is what happened:

Tried to install elixir 1.8.2 from source. Got error about Erlang (I had version 18).
Installed Erlang 22. Got an error trying to install Elixir.
Installed Erlang 20. Got an error installing Elixir about being compiled in a different version of Erlang. optcode 150-something, but used optcode 168.
Installed Version 21. Same error - only have up to optcode 163, but need up to 168.
Read some github entry which suggest that an error was fixed after 21.0.
Installed 21.1. Crashed, at some make file recipe for targe erlang failed.
Installed 21.2. Crashed, makefile 64: recipe for target erlang failed.

Not sure if its relevant, but I noticed that erlang --version returns command not found: erlang.

Can anyone suggest for me a combination of elixir version and erlang version that should work together? Or help me resolve this problem another way?

I’ve been using Erlang OTP.

Showing Posts 1 to 10

NobbZ

NobbZ

This seems to be quite a lot of trying. Can you please remove all of your installation attempts?

Then it’s probably easiest to switch to Arch Linux :wink: or just use a toolset manager like asdf-vm. It will be able to install, run and change appropriate version sets as you specify them per project.

Also in the official documentation there is a compatibility matrix that tells you which version of elixir is known to work with which version of Erlang.

Just remember that the runtime version of Erlang needs to be equal to or greater than the version used for compiling.

bend

bend OP

Thanks for the replies.

I tried asdf as well but was struggling to get it to find the newest version. I hadn’t seen this link so I will try again.

I saw this compatibility table (Compatibility and deprecations — Elixir v1.20.2) but I couldn’t get any of these combinations to work. For instance I tried otp 20, 20.1, 20.2, 21.0, 21.1, 21.2 with a few versions of elixir 1.7 and 1.8 and some other combinations.

I saw the errors about unmatching runtime/compile time Erlang versions, so I’ve been careful to recompile elixir after reinstalling a different Erlang version. I keep getting errors like this though:

Loading of /usr/local/lib/erlang/lib/crypto-4.5/ebin/crypto.beam failed: badfile

Makefile:62: recipe for target ‘erlang’ failed

Anyway, thanks again for the replies, I’ll try asdf again now.

bend

bend OP

@peerreynders I can’t get asdf to work. I added plugin for elixir, installed then tried to use it and got the error:

01:10:27.753 [error] Loading of /usr/local/lib/erlang/lib/compiler-7.4/ebin/compile.beam failed: :badfile

01:10:27.754 [error] beam/beam_load.c(1878): Error loading module compile:
This BEAM file was compiled for a later version of the run-time system than 21.
To fix this, please recompile this module with an 21 compiler.
(Use of opcode 164; this emulator supports only up to 163.)

ConnorRigby

ConnorRigby

Nerves Core Team

:laughing:

NobbZ

NobbZ

Please deinstall all former tries, also make sure that the location containing asdfs shims is located before your systems binaries in PATH.

rcb

rcb

I had issues installing Elixir on Linux initially too. I ended up using an installer provided on the Erlang Solutions website, which bundled Erlang and Elixir together. That seemed to be the easiest way to get started (though I intend on trying a version manager such as asdf soon).

Edit: Corrected misunderstood website source.

NobbZ

NobbZ

This is not the Erlang website! This is the website of Erlang solutions, a big supporter of the Erlang ecosystem.

Also even though mint is a derivat of Ubuntu, I’d be careful to use the packages that were originally built for Debian and Ubuntu. Dependencies might not be available on mints repositories natively.

PS: even though it doesn’t sound like this right now, usually I strictly prefer installation from the systems package manager over installation from source. But especially for languages compilers I learnt to love version managers like asdf, they really make life easier when one is using them with discipline.

rcb

rcb

My bad on the mix-up. I’ve corrected my post. I agree regarding version managers — I’d love to have a well-designed manager like rvm for Elixir. I’m hoping that asdf is just as user-friendly.

alexiss

alexiss

I’ve Linux Mint 19 with over 10 versions of erlang and elixir installed via asdf without any problems:

alexiss@alexiss:/work/home/alexiss$ asdf list erlang
  20.0
  20.1
  20.2.2
  20.2.3
  20.3.1
  20.3.2
  21.0.8
  21.1.1
  21.2.1
  21.3.2
  21.3.6
  21.3.8
  22.0.1
alexiss@alexiss:/work/home/alexiss$ asdf list elixir
  1.5.1
  1.5.2
  1.6.1
  1.6.4
  1.7.2
  1.7.3
  1.7.4
  1.8.1
  1.8.2
alexiss@alexiss:/work/home/alexiss$ 

Try to install it step-by-step following links from this post

Also make sure you complete all steps for Ubuntu before installing erlang

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
yarrichar
I’m very new to Elixir, so sorry if this is a silly question: I am wondering what happens to the mailbox of a process when the machine i...
New
pragdave
How do I tell Hologram not to escape HTML when substituting into templates? {Textile.render(@product.long_description)} escapes the HTM...
New
Fl4m3Ph03n1x
Background When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error: * assembling mark...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
rlipscombe
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews