Phillipp

Phillipp

Problems with Elixir (erlang crypto module) on Ubuntu (ARM)

Hey,

I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the Elixir website and installed Elixir 1.6.

pi@NanoPi-M3:~$ elixir -v
Erlang/OTP 20 [erts-9.1.5] [source] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.6.1 (compiled with OTP 19)

Now when I try to install Hex I get:

pi@NanoPi-M3:~$ mix local.hex

18:04:10.362 [error] Unable to load crypto library. Failed with error:
":load_failed, Failed to load NIF library /usr/lib/erlang/lib/crypto-4.1/priv/lib/crypto: 'libcrypto.so.1.1: cannot open shared object file: No such file or directory'"
OpenSSL might not be installed on this system.


18:04:10.372 [warn]  The on_load function for module crypto returned:
{:error, {:load_failed, 'Failed to load NIF library /usr/lib/erlang/lib/crypto-4.1/priv/lib/crypto: \'libcrypto.so.1.1: cannot open shared object file: No such file or directory\''}}

** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], {:eoptions, {:undef, [{:crypto, :supports, [], []}, {:tls_record, :supported_protocol_versions, 1, [file: 'tls_record.erl', line: 407]}, {:tls_record, :supported_protocol_versions, 0, [file: 'tls_record.erl', line: 247]}, {:ssl, :handle_options, 3, [file: 'ssl.erl', line: 709]}, {:ssl, :connect, 4, [file: 'ssl.erl', line: 115]}, {:http_transport, :connect, 4, [file: 'http_transport.erl', line: 109]}, {:httpc_handler, :connect, 4, [file: 'httpc_handler.erl', line: 790]}, {:httpc_handler, :connect_and_send_first_request, 3, [file: 'httpc_handler.erl', line: 802]}]}}}]}

Could not install Hex because Mix could not download metadata at https://repo.hex.pm/installs/hex-1.x.csv.

I then tried to install erlang-crypto but it fails due to missing libssl1.1.0.

pi@NanoPi-M3:~$ sudo apt-get install erlang-crypto
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 erlang-crypto : Depends: libssl1.1 (>= 1.1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

Then I compiled OpenSSL 1.1.0 from source.

pi@NanoPi-M3:~$ openssl version
OpenSSL 1.1.0f  25 May 2017

But I get the same error when I try to install erlang-crypto.

Now I am at the point where I want to throw the NanoPi-M3 into a corner of my room. It’s really frustrating that it seems to be impossible to get anything working on an ARM based machine.

Most Liked

maz

maz

The issue was that the alpine linux release build was at 3.8, which was at an older version of libssl. The solution was to use alpine linux version 3.9 and apk libssl1.1

dokuzbir

dokuzbir

aptitude is better about unmet dependencies. You can give it a try

sudo apt-get install aptitude
sudo aptitude install erlang-crypto
Phillipp

Phillipp

I used @dokuzbir s solution and it worked. But it seems like it swapped the esl-erlang package with the erlang-* packages. I think I gonna do a clean install with asdf later.

Last Post!

e.fu

e.fu

This works for me on a fresh install:

***** Don’t forget to run:
sudo apt-get dist-upgrade
***** on a new installed system

and than install like in the elixir docu:

  • Add Erlang Solutions repo: wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
  • Run: sudo apt-get update
  • Install the Erlang/OTP platform and all of its applications: sudo apt-get install esl-erlang
  • Install Elixir: sudo apt-get install elixir

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement