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.

Where Next?

Popular in Questions Top

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
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
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
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
vegabook
I'm brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
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

Other popular topics Top

chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I fore...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "eq...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47849 226
New

We're in Beta

About us Mission Statement