Problems running Livebook - no match of right hand side value: {:error, {:ssl, {‘no such file or directory’, ‘ssl.app’}}}

Hi,

For several days I have been having problems trying to run livebook.

I have installed Erlang and Elixir using asdf.

The Erlang version I am using is 24.0.2.
The Elixir version I am using is 1.21.1-otp-24.

I am using Ubuntu 20.10 groovy (x86-64), Linux kernel 5.8.0-55-generic.
live.

I run

git clone https://github.com/elixir-nx/livebook.git
cd livebook
mix deps.get --only prod

And that’s what appears:

Could not find Hex, which is needed to build dependency :phoenix
Shall I install Hex? (if running non-interactively, use “mix local.hex --force”) [Yn]

I press Y and enter. The error message is below:

12:32:52.202 [error] Task #PID<0.109.0> started from #PID<0.94.0> terminating
** (MatchError) no match of right hand side value: {:error, {:ssl, {‘no such file or directory’, ‘ssl.app’}}}
(mix 1.12.1) lib/mix/utils.ex:626: Mix.Utils.read_httpc/1
(mix 1.12.1) lib/mix/utils.ex:558: anonymous fn/2 in Mix.Utils.read_path/2
(elixir 1.12.1) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
(elixir 1.12.1) lib/task/supervised.ex:35: Task.Supervised.reply/5
(stdlib 3.15.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<5.7662958/0 in Mix.Utils.read_path/2>
Args: []
** (EXIT from #PID<0.94.0>) an exception was raised:
** (MatchError) no match of right hand side value: {:error, {:ssl, {‘no such file or directory’, ‘ssl.app’}}}
(mix 1.12.1) lib/mix/utils.ex:626: Mix.Utils.read_httpc/1
(mix 1.12.1) lib/mix/utils.ex:558: anonymous fn/2 in Mix.Utils.read_path/2
(elixir 1.12.1) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
(elixir 1.12.1) lib/task/supervised.ex:35: Task.Supervised.reply/5
(stdlib 3.15.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

Could someone help me?

Regards,

Adolfo

1 Like

This typically means your Erlang was installed without a linked openssl or similar library. So you need to address that first. In this case, perhaps the quickest way to run Livebook is using the Docker image?

4 Likes

Thanks, José.
It was already working with Docker.
The problem had nothing to do with Erlang, Elixir or Livebook.
I have found a very simple solution after hours and hours trying to fix my Ubuntu.
I have just created a new user, installed asdf again. Then I installed Erlang and Elixir (the versions above) and ran livebook with “MIX_ENV=prod mix phx.server”. Everything works now.