Hi there,
I’m trying to get this LiveView demo working:
I’m running on a Raspberry Pi Zero which didn’t appear to have the latest Erlang or Elixir, so I build them both. I build Erlang via Kerl and then Elixir.
pi@raspberrypi:~/Development/phoenix-liveview-counter-tutorial $ mix hex.info
Hex: 0.20.5
Elixir: 1.10.4
OTP: 23.0.3
Built with: Elixir 1.10.0 and OTP 21.3
Erlang seems fine (I can build and run stuff). However, I’m struggling to get started with the LiveView counter demo. I’m
pi@raspberrypi:~/Development/phoenix-liveview-counter-tutorial $ mix setup
11:09:57.311 [error] Task #PID<0.163.0> started from :hex_fetcher terminating
** (stop) exited in: :gen_server.call(:application_controller, {:set_env, :crypto, :"$curves$", [:secp160k1, :secp160r1, :secp160r2, :secp192r1, :secp192k1, :secp224k1, :secp224r1, :secp256k1, :secp256r1, :secp384r1, :secp521r1, :prime192v1, :prime192v2, :prime192v3, :prime239v1, :prime239v2, :prime239v3, :prime256v1, :wtls7, :wtls9, :wtls12, :brainpoolP160r1, :brainpoolP160t1, :brainpoolP192r1, :brainpoolP192t1, :brainpoolP224r1, :brainpoolP224t1, :brainpoolP256r1, :brainpoolP256t1, :brainpoolP320r1, :brainpoolP320t1, :brainpoolP384r1, :brainpoolP384t1, :brainpoolP512r1, :brainpoolP512t1, :sect163k1, :sect163r1, :sect163r2, :sect193r1, :sect193r2, :sect233k1, :sect233r1, :sect239k1, :sect283k1, :sect283r1, :sect409k1, ...], []})
** (EXIT) time out
(stdlib 3.13) gen_server.erl:238: :gen_server.call/2
(crypto 4.7) crypto.erl:2836: :crypto.cached_curve_algorithms/0
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto.supports/0
(ssl 10.0) tls_record.erl:743: :tls_record.sufficient_support/1
(ssl 10.0) tls_record.erl:370: :tls_record.supported_protocol_versions/1
(ssl 10.0) tls_record.erl:358: :tls_record.supported_protocol_versions/0
Function: #Function<17.86168715/0 in Hex.Registry.Server.prefetch_online/2>
Args: []
11:09:57.312 [error] Task #PID<0.162.0> started from :hex_fetcher terminating
** (stop) exited in: :gen_server.call(:application_controller, {:set_env, :crypto, :"$curves$", [:secp160k1, :secp160r1, :secp160r2, :secp192r1, :secp192k1, :secp224k1, :secp224r1, :secp256k1, :secp256r1, :secp384r1, :secp521r1, :prime192v1, :prime192v2, :prime192v3, :prime239v1, :prime239v2, :prime239v3, :prime256v1, :wtls7, :wtls9, :wtls12, :brainpoolP160r1, :brainpoolP160t1, :brainpoolP192r1, :brainpoolP192t1, :brainpoolP224r1, :brainpoolP224t1, :brainpoolP256r1, :brainpoolP256t1, :brainpoolP320r1, :brainpoolP320t1, :brainpoolP384r1, :brainpoolP384t1, :brainpoolP512r1, :brainpoolP512t1, :sect163k1, :sect163r1, :sect163r2, :sect193r1, :sect193r2, :sect233k1, :sect233r1, :sect239k1, :sect283k1, :sect283r1, :sect409k1, ...], []})
** (EXIT) time out
(stdlib 3.13) gen_server.erl:238: :gen_server.call/2
(crypto 4.7) crypto.erl:2836: :crypto.cached_curve_algorithms/0
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto.supports/0
(ssl 10.0) tls_record.erl:743: :tls_record.sufficient_support/1
(ssl 10.0) tls_record.erl:370: :tls_record.supported_protocol_versions/1
(ssl 10.0) tls_record.erl:358: :tls_record.supported_protocol_versions/0
Function: #Function<17.86168715/0 in Hex.Registry.Server.prefetch_online/2>
Args: []
11:09:57.312 [error] Task #PID<0.159.0> started from :hex_fetcher terminating
** (stop) exited in: :gen_server.call(:application_controller, {:set_env, :crypto, :"$curves$", [:secp160k1, :secp160r1, :secp160r2, :secp192r1, :secp192k1, :secp224k1, :secp224r1, :secp256k1, :secp256r1, :secp384r1, :secp521r1, :prime192v1, :prime192v2, :prime192v3, :prime239v1, :prime239v2, :prime239v3, :prime256v1, :wtls7, :wtls9, :wtls12, :brainpoolP160r1, :brainpoolP160t1, :brainpoolP192r1, :brainpoolP192t1, :brainpoolP224r1, :brainpoolP224t1, :brainpoolP256r1, :brainpoolP256t1, :brainpoolP320r1, :brainpoolP320t1, :brainpoolP384r1, :brainpoolP384t1, :brainpoolP512r1, :brainpoolP512t1, :sect163k1, :sect163r1, :sect163r2, :sect193r1, :sect193r2, :sect233k1, :sect233r1, :sect239k1, :sect283k1, :sect283r1, :sect409k1, ...], []})
** (EXIT) time out
(stdlib 3.13) gen_server.erl:238: :gen_server.call/2
(crypto 4.7) crypto.erl:2836: :crypto.cached_curve_algorithms/0
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto.supports/0
(ssl 10.0) tls_record.erl:743: :tls_record.sufficient_support/1
(ssl 10.0) tls_record.erl:370: :tls_record.supported_protocol_versions/1
(ssl 10.0) tls_record.erl:358: :tls_record.supported_protocol_versions/0
Function: #Function<17.86168715/0 in Hex.Registry.Server.prefetch_online/2>
Args: []
11:09:57.312 [error] Task #PID<0.158.0> started from :hex_fetcher terminating
** (stop) exited in: :gen_server.call(:application_controller, {:set_env, :crypto, :"$curves$", [:secp160k1, :secp160r1, :secp160r2, :secp192r1, :secp192k1, :secp224k1, :secp224r1, :secp256k1, :secp256r1, :secp384r1, :secp521r1, :prime192v1, :prime192v2, :prime192v3, :prime239v1, :prime239v2, :prime239v3, :prime256v1, :wtls7, :wtls9, :wtls12, :brainpoolP160r1, :brainpoolP160t1, :brainpoolP192r1, :brainpoolP192t1, :brainpoolP224r1, :brainpoolP224t1, :brainpoolP256r1, :brainpoolP256t1, :brainpoolP320r1, :brainpoolP320t1, :brainpoolP384r1, :brainpoolP384t1, :brainpoolP512r1, :brainpoolP512t1, :sect163k1, :sect163r1, :sect163r2, :sect193r1, :sect193r2, :sect233k1, :sect233r1, :sect239k1, :sect283k1, :sect283r1, :sect409k1, ...], []})
** (EXIT) time out
(stdlib 3.13) gen_server.erl:238: :gen_server.call/2
(crypto 4.7) crypto.erl:2836: :crypto.cached_curve_algorithms/0
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto."-supports/0-lc$^0/1-0-"/1
(crypto 4.7) crypto.erl:677: :crypto.supports/0
(ssl 10.0) tls_record.erl:743: :tls_record.sufficient_support/1
(ssl 10.0) tls_record.erl:370: :tls_record.supported_protocol_versions/1
(ssl 10.0) tls_record.erl:358: :tls_record.supported_protocol_versions/0
Function: #Function<17.86168715/0 in Hex.Registry.Server.prefetch_online/2>
Args: []
Is there anything obvious I’m doing wrong here?
Notes:
I wondered if I had a dodgy Erlang build with broken crypto, so I followed this (https://pattern-match.com/blog/erlang-how-to-safely-build-erlang-with-crypto-without-openssl-issues/) and built my own OpenSSL and built a new Erlang pointing to that and still get the same errors.
I also tried running mix hex.user register
and mix hex.user auth
but that didn’t seem to help things either.
I also tried to install the Erlang Solutions deb but wasn’t successful with that either:
pi@raspberrypi:~/Development/phoenix-liveview-counter-tutorial $ wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
--2020-08-14 10:32:45-- https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
Resolving packages.erlang-solutions.com (packages.erlang-solutions.com)... 52.85.104.91, 52.85.104.21, 52.85.104.112, ...
Connecting to packages.erlang-solutions.com (packages.erlang-solutions.com)|52.85.104.91|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6288 (6.1K)
Saving to: ‘erlang-solutions_2.0_all.deb’
erlang-solutions_2.0_al 100%[==============================>] 6.14K --.-KB/s in 0.001s
2020-08-14 10:32:45 (10.2 MB/s) - ‘erlang-solutions_2.0_all.deb’ saved [6288/6288]
pi@raspberrypi:~/Development/phoenix-liveview-counter-tutorial $ sudo dpkg -i erlang-solutions_2.0_all.deb
Selecting previously unselected package erlang-solutions.
(Reading database ... 46462 files and directories currently installed.)
Preparing to unpack erlang-solutions_2.0_all.deb ...
Unpacking erlang-solutions (2.0) ...
Setting up erlang-solutions (2.0) ...
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
pi@raspberrypi:~/Development/phoenix-liveview-counter-tutorial $ sudo apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Ign:3 http://binaries.erlang-solutions.com/debian buster InRelease
Get:4 http://binaries.erlang-solutions.com/debian buster Release [4,572 B]
Get:5 http://binaries.erlang-solutions.com/debian buster Release.gpg [833 B]
Get:6 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:7 http://archive.raspberrypi.org/debian buster/main armhf Packages [331 kB]
Get:8 http://binaries.erlang-solutions.com/debian buster/contrib armhf Packages [48.5 kB]
Fetched 13.4 MB in 26s (519 kB/s)
Reading package lists... Done
pi@raspberrypi:~/Development/phoenix-liveview-counter-tutorial $ sudo apt-get install --no-install-recommends esl-erlang elixir
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
elixir : Depends: erlang-base (>= 1:22.3) but it is not going to be installed or
erlang-base-hipe (>= 1:22.3) or
esl-erlang (>= 1:22.3) but 1:22.1.6-1 is to be installed
Depends: erlang-crypto (>= 1:22.3) or
esl-erlang (>= 1:22.3) but 1:22.1.6-1 is to be installed
Depends: erlang-inets (>= 1:22.3) or
esl-erlang (>= 1:22.3) but 1:22.1.6-1 is to be installed
Depends: erlang-ssl (>= 1:22.3) or
esl-erlang (>= 1:22.3) but 1:22.1.6-1 is to be installed
Depends: erlang-syntax-tools (>= 1:22.3) or
esl-erlang (>= 1:22.3) but 1:22.1.6-1 is to be installed
E: Unable to correct problems, you have held broken packages.