Error when installing :ex_doc

Hi everyone, I am trying to install the :ex_doc library,but I get the an error, I am used asdf to install elixir on my linux machine. I am using elixir 1.3.4 and Erlang/OTP 19. This is the error:

Could not find Hex, which is needed to build dependency :ex_doc
Shall I install Hex? (if running non-interactively, use: “mix local.hex --force”) [Yn]
** (MatchError) no match of right hand side value: {:error, {:ssl, {‘no such file or directory’, ‘ssl.app’}}}
(mix) lib/mix/utils.ex:420: Mix.Utils.read_httpc/1
(mix) lib/mix/utils.ex:364: Mix.Utils.read_path/2
(mix) lib/mix/local.ex:139: Mix.Local.read_path!/2
(mix) lib/mix/local.ex:118: Mix.Local.find_matching_versions_from_signed_csv!/2
(mix) lib/mix/tasks/local.hex.ex:29: Mix.Tasks.Local.Hex.run/1
(mix) lib/mix/dep/loader.ex:143: Mix.Dep.Loader.with_scm_and_app/4
(mix) lib/mix/dep/loader.ex:99: Mix.Dep.Loader.to_dep/3
(elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2

Thank you for any help provided

This is a super old version of elixir. Do you have a specific reason why you’re.not using something more contemporary?

2 Likes

I am following a course on udemy, and the instructor is using that version.

It’s likely a very good idea to go to at least 1.7. Try it, no problems are expected unless the code is relying on a very particular old behaviour.

I’ll try that then, thank you.

Even though in fact both versions are old, just updating them might help you or might not, depending on how you installed them.

The reason for the error you are currently facing is, that your Erlang got installed without SSL support.

This might have many reasons, depending on your installation method. Just tell us how you installed and we might help you sorting that issue out.

1 Like

I installed it using asdf following this guide(https://medium.com/juq/how-to-manage-elixir-versions-on-mac-or-linux-getting-started-with-elixir-12308e7b6451). What I did basically was installed asdf, install the plugins required by erlang/elixir and then install erlang and elixir versions I mentioned before.

The version that is installed in that blog post is old. Current version is 0.7.something, though the post installs 0.6.something.

Anyway, for the SSL support in erlang to be available, you need to install SSL development headers first. How this is done depends on your Linux distribution. Can you tell which you are using?

Yep, also make sure asdf itself is the latest version. Then do asdf plugin update --all (assuming the plugins for Erlang and Elixir are already installed!) and then install a bit bigger version, like 1.7.