Module :public_key is not available)

Getting this error when requesting , internal ip.

iex(11)> :httpc.request("")
** (UndefinedFunctionError) function :public_key.pkix_verify_hostname_match_fun/1 is undefined (module :public_key is not available)
    (public_key 1.14) :public_key.pkix_verify_hostname_match_fun(:https)
    (inets 9.0.1) httpc.erl:471: :httpc.ssl_verify_host_options/1
    (inets 9.0.1) httpc.erl:1015: anonymous fn/0 in :httpc.http_options_default/0
    (inets 9.0.1) httpc.erl:961: :httpc.http_options/3
    (inets 9.0.1) httpc.erl:771: :httpc.handle_request/9
    iex:11: (file)

Installed version,
elixir 1.15.4-otp-26
erlang 26.0.2

also did
sudo apt install erlang-*

extra_applications: [

extra_applications: [

It is unclear how did you solve the problem. Did you add the :public_key key to extra_applications?


I’m also interested in this one because my deployments to are failing because of the same reason.

add :public_key to extra applications under mix.exs
extra_applications: [

1 Like