Skip to content

Failed to load crypto library on mac os #5453

Closed
@heiko-braun

Description

@heiko-braun

Environment

  • Elixir version (elixir -v): Elixir 1.3.4
  • Operating system: Mac OS

Current behavior

From ERL

Using the crypto library from erlang succeeds:

Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.1  (abort with ^G)
1> crypto:strong_rand_bytes(16).
<<11,212,135,144,175,71,19,174,99,107,69,84,207,22,255,221>>


From Elixir (iex)

Using the same library from elixir fails:

08:41:36.251 [error] Unable to load crypto library. Failed with error:
":load, Library load-call unsuccessful."
OpenSSL might not be installed on this system.


08:41:36.251 [warn]  The on_load function for module crypto returned {:error, {:load, 'Library load-call unsuccessful.'}}

** (UndefinedFunctionError) function :crypto.supports/0 is undefined (module :crypto is not available)
     (crypto) :crypto.supports()
        (ssl) tls_v1.erl:262: :tls_v1.signature_algs/2
        (ssl) ssl.erl:1041: :ssl.handle_hashsigns_option/2
        (ssl) ssl.erl:728: :ssl.handle_options/2
        (ssl) ssl.erl:128: :ssl.connect/4
    (hackney) src/hackney_connect.erl:246: :hackney_connect.do_connect/5
    (hackney) src/hackney_connect.erl:37: :hackney_connect.connect/5
    (hackney) src/hackney.erl:328: :hackney.request/5

```

### Expected behavior

crypto should work form elixir as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions