Background
I have a Ubuntu and I am trying to install Erlang 22.2.8 via the asdf-erlang plugin .
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Problem
In fact, I want to install any version of Erlang, but none works.
$ asdf install erlang 22.2.8
Downloading kerl...
$
It stops after "Downloading kerl" and then nothing happens. It is like it finished. I have followed the steps before-asdf-install also before installing the plugin, but non the less this does not prevent the error.
How can I fix this?
1条答案
按热度按时间yks3o0rb1#
After a lot of investigation by me and several people from the Elixir community, we have finally discovered what was the issue.
Issue
The first clue was the exit signal of the command itself:
The exit code is 1. Which means an error was occurring.
So after digging into the code, we found there was a curl call I was not able to make:
I was having SSL certificate issues. This is happening because of the company VPN/Proxy.
A quickfix/workaround could be found using the
-k
option to allow the curl to connect to insecure connections. After trying that curl with-k
the request succeeded, which proved the theory correct.Solution
With the issue identified, it was time to search for a solution. The solution I believe would be the most adequate, would be to add the company certificates to ssl certs.pem. This is described better in the following SO post:
How to fix "SSL certificate problem: self signed certificate in certificate chain" error?
Quick workaround
However, that solution didn't work me. So I eventually decided to go with the risky option, which was to use the
~/.curlrc
.https://ec.haxx.se/cmdline/cmdline-configfile#default-config-file
After setting up this file and adding the
-k
option in it, it worked. I can now finally install the erlang versions I need.It should be noted, this is a risk. In fact, this is a workaround and not really a solution.
However, for the time being, I will happily take it.
History
This is a summary of the whole discussion I had with the Elixir community. If you are interested in the full process, you can check the post:
https://elixirforum.com/t/installing-erlang-via-asdf-on-ubuntu-fails-after-downloading-kerl/36806/25