Phillipp

Phillipp

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.

Showing Posts 1 to 10

outlog

outlog

Phillipp

Phillipp OP

I considered it earlier but was unsure if it’ll work on ARM based systems at all.

dokuzbir

dokuzbir

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

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

NobbZ

Of course you do, apt isn’t aware of the source compiled openssl.

When you try to install libssl manually what message do you get then?

It should be available in the Ubuntu arm repositories…

Phillipp

Phillipp OP

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.

maz

maz

I have the same problem but while running a docker-compose run --rm myapp migrate command. Ubuntu 18.04. It fails on this line in my release_tasks.ex:

Ecto.Migrator.run(repo, migrations_path, :up, all: true)

The deployment and migration succeeded many times before so I have no idea why this happened all of a sudden. I even reverted to the last successful deployment and the issue still appeared. I tried @dokuzbir suggestion and it made no difference. I also updated to all the security and os updates. I don’t think I can use asdf because that would obviate the use of Docker. Any suggestions?

here is the pertinent part of the log:

Running migrations for db
17:16:43.739 [error] Unable to load crypto library. Failed with error:
":load_failed, Failed to load NIF library: 'Error loading shared library libcrypto.so.1.1: No such file or directory (needed by /app/lib/crypto-4.4/priv/lib/crypto.so)'"
OpenSSL might not be installed on this system.

17:16:43.752 [error] Unable to load crypto library. Failed with error:
":load_failed, Failed to load NIF library: 'Error loading shared library libcrypto.so.1.1: No such file or directory (needed by /app/lib/crypto-4.4/priv/lib/crypto.so)'"
OpenSSL might not be installed on this system.

17:16:43.761 [warn] The on_load function for module crypto returned:
{:error, {:load_failed, 'Failed to load NIF library: \'Error loading shared library libcrypto.so.1.1: No such file or directory (needed by /app/lib/crypto-4.4/priv/lib/crypto.so)\''}}

17:16:43.774 [error] GenServer #PID<0.145.0> terminating
** (RuntimeError) connect raised UndefinedFunctionError exception.The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true if you wish to see all of the details
    (crypto) :crypto.hash/2
    (postgrex) lib/postgrex/protocol.ex:721: Postgrex.Protocol.auth_md5/4
    (postgrex) lib/postgrex/protocol.ex:576: Postgrex.Protocol.handshake/2
    (db_connection) lib/db_connection/connection.ex:66: DBConnection.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
17:16:43.786 [error] Unable to load crypto library. Failed with error:
":load_failed, Failed to load NIF library: 'Error loading shared library libcrypto.so.1.1: No such file or directory (needed by /app/lib/crypto-4.4/priv/lib/crypto.so)'"
OpenSSL might not be installed on this system.
dokuzbir

dokuzbir

sudo apt-get install erlang-crypto

what kind of error you get when you try install ?

maz

maz

while running as root:

root@****:~/api.faithfulword.app/add-1.2-api# apt-get install erlang-crypto
Reading package lists... Done
Building dependency tree       
Reading state information... Done
erlang-crypto is already the newest version (1:20.2.2+dfsg-1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dokuzbir

dokuzbir

And how about OpenSSL ? Can you check version of it ?

maz

maz

root@****:~/api.faithfulword.app/add-1.2-api# openssl version
OpenSSL 1.1.0g  2 Nov 2017

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews