Steps to replicate problem:
- install raspbian lite on a rasberry pi 3 model b+
- install latest version of elixir using the method described here: https://elixir-lang.org/install.html#raspberry-pi
- Start iex and execute “import Calendar.ISO”
Expected result is that elixir imports this library.
What I get instead is an error.
[error] Loading of /usr/lib/elixir/bin…/lib/elixir/ebin/Elixir.Calendar.ISO.beam failed: :badfile
[error] bean/beam_load.c(2314): Error loading function ‘Elixir.Calendar.ISO’:from_unix/2: op i_plus q x p x: no specific operation found
What I’ve tried so far: reinstalled my rasberry completely (I first had a full raspbian installation, changed to lite version), use an older elixir version. Reason I noticed this problem is that phoenix tries to import Calendar.ISO hen compiling. Currently using elixir 1.8.1, erlang/OTP 22 (erts-10.41).
Seems to be that the package is defect, have you tried installing from source?
If installation from source does work and fixes the module, I’d suggest to contact erlang-solutions and tell them about the defective package, such that they can recompile and update it.
Keep in mind though, that erlang solutions is not related to elixir at all. They are just a company that happens to provide those packages for free.
I would recommend/try using the asdf package manager for installing erlang and elixir… https://asdf-vm.com/
Thanks @outlog, installing with asdf fixed it.
Greetings salo, can you point me in the right direction for you asdf install. I am a bit out of my element, I have been working on installing elixir/erlang on my pi for a few weeks. It looks like an issue with Elixir requesting erlang-base version 1.20.3 and the version for pi is 126.96.36.199, but from what I am reading asdf may be helpful in fixing this issue.
Any help would be greatly appreciated
I’ve tried installing it on asdf, but it’s not working for some reason. I had Elixir 1.9.0 and Erlang 22.0 (they said Elixir was compiled against 20.0 so I’m trying to install that.)
I was able to use it with (ESL) Erlang/OTP21:
# sudo apt remove -y esl-erlang && sudo apt autoremove
sudo apt install -y esl-erlang=1:21.3.3-1
sudo apt-mark hold esl-erlang # prevents apt from updating the package
sudo apt install -y elixir
You can find available alternative versions using
apt list -a esl-erlang
Maybe it helps someone