简体   繁体   中英

Hex install failed on aws instance , failed to fetch metadata

This is on an an aws lightsail instance, was trying to deploy my phoenix app, mix local.hex fails, any idea how to fix this please?

could be a DNS issue but not sure.

 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.

Reading the full error, I think the problem is that OpenSSL is not installed on the lightsail instance. You would have to install openssl first. How you do this depends on the OS. For example, on linux, one would do:

sudo apt install openssl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM