【问题标题】:Hex install failed on aws instance , failed to fetch metadata十六进制安装在 aws 实例上失败,无法获取元数据
【发布时间】:2020-09-30 00:44:05
【问题描述】:

这是在一个 aws lightsail 实例上,正在尝试部署我的 phoenix 应用程序,混合 local.hex 失败,请问知道如何解决这个问题吗?

可能是 DNS 问题,但不确定。

Could not install Hex because Mix could not download metadata at https://repo.hex.pm/instal
ls/hex-1.x.csv.
 mix local.hex --force

14:34:53.444 [error] Unable to load crypto library. Failed with error:
":load_failed, Failed to load NIF library: '/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: ver
sion `OPENSSL_1_1_1' not found (required by /usr/lib/erlang/lib/crypto-4.7/priv/lib/crypto.
so)'"
OpenSSL might not be installed on this system.


14:34:53.455 [warn]  The on_load function for module crypto returned:
{:error, {:load_failed, 'Failed to load NIF library: \'/usr/lib/x86_64-linux-gnu/libcrypto.
so.1.1: version `OPENSSL_1_1_1\' not found (required by /usr/lib/erlang/lib/crypto-4.7/priv
/lib/crypto.so)\''}}

** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {'repo.hex.pm', 443}},
 {:inet, [:inet], {:eoptions, {:undef, [{:crypto, :supports, [], []}, {:tls_record, :suffic
ient_support, 1, [file: 'tls_record.erl', line: 743]}, {:tls_record, :supported_protocol_ve
rsions, 1, [file: 'tls_record.erl', line: 370]}, {:tls_record, :supported_protocol_versions
, 0, [file: 'tls_record.erl', line: 358]}, {:ssl, :handle_option, 4, [file: 'ssl.erl', line
: 1903]}, {:ssl, :process_options, 3, [file: 'ssl.erl', line: 1635]}, {:ssl, :handle_option
s, 3, [file: 'ssl.erl', line: 1589]}, {:ssl, :connect, 4, [file: 'ssl.erl', line: 593]}]}}}
]}

Could not install Hex because Mix could not download metadata at https://repo.hex.pm/instal
ls/hex-1.x.csv.

【问题讨论】:

    标签: amazon-web-services hex elixir phoenix-framework elixir-mix


    【解决方案1】:

    阅读完整错误,我认为问题在于 lightsail 实例上未安装 OpenSSL。您必须先安装 openssl。你如何做到这一点取决于操作系统。例如,在 linux 上,可以这样做:

    sudo apt install openssl
    

    【讨论】:

      猜你喜欢
      • 2022-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-12
      • 2014-02-18
      • 2021-06-08
      相关资源
      最近更新 更多