wslでelixir その157

# 概要
wsl(wsl2じゃない)で、elixirやってみた。
Livebookをアップデートしてみた。

# 環境
windows10
wsl1
ubuntu20.04

# 写真
Livebook v0.15.3
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/18104/2fb85b7f-1d1f-480c-a288-17185fd63f94.png)

# 手順

```
$ asdf install erlang latest

asdf_27.3 is not a kerl-managed Erlang/OTP installation
No build named asdf_27.3
Downloading 27.3 to /home/ore/.asdf/downloads/erlang/27.3...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 96.7M  100 96.7M    0     0  8794k      0  0:00:11  0:00:11 --:--:-- 9456k
Extracting source code
Building Erlang/OTP 27.3 (asdf_27.3), please wait...
APPLICATIONS DISABLED (See: /home/ore/.asdf/plugins/erlang/kerl-home/builds/asdf_27.3/otp_build_27.3.log)
 * jinterface     : No Java compiler found
 * odbc           : ODBC library - link check failed

APPLICATIONS INFORMATION (See: /home/ore/.asdf/plugins/erlang/kerl-home/builds/asdf_27.3/otp_build_27.3.log)
 * wx             : No OpenGL headers found, wx will NOT be usable
 * No GLU headers found, wx will NOT be usable
 * wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available
 *         wxWidgets must be installed on your system.
 *         Please check that wx-config is in path, the directory
 *         where wxWidgets libraries are installed (returned by
 *         'wx-config --libs' or 'wx-config --static --libs' command)
 *         is in LD_LIBRARY_PATH or equivalent variable and
 *         wxWidgets version is 3.0.2 or above.

Erlang/OTP 27.3 (asdf_27.3) has been successfully built
Cleaning up compilation products for 27.3
Cleaned up compilation products for 27.3 under /home/ore/.asdf/plugins/erlang/kerl-home/builds

$ asdf install elixir latest

==> Checking whether specified Elixir release exists...
==> Downloading 1.18.3-otp-27 to /home/ore/.asdf/downloads/elixir/1.18.3-otp-27/elixir-precompiled-1.18.3-otp-27.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7758k  100 7758k    0     0  4742k      0  0:00:01  0:00:01 --:--:-- 4742k
==> Copying release into place

$ asdf global erlang latest

$ asdf global elixir latest

$ asdf current

elixir          1.18.3-otp-27   /home/ore/.tool-versions
erlang          27.3            /home/ore/.tool-versions

$ mix do local.rebar --force, local.hex --force

* creating .asdf/installs/elixir/1.18.3-otp-27/.mix/elixir/1-18/rebar3
* creating .asdf/installs/elixir/1.18.3-otp-27/.mix/archives/hex-2.1.1

$ mix escript.install hex livebook

Resolving Hex dependencies...
Resolution completed in 1.355s
New:
  aws_credentials 0.3.2
  bandit 1.6.5
  castore 1.0.12
  decimal 2.3.0
  dns_cluster 0.1.3
  earmark_parser 1.4.42
  ecto 3.12.5
  eini_beam 2.2.4
  finch 0.19.0
  fresh 0.4.4
  hpax 1.0.2
  iso8601 1.3.4
  jason 1.4.4
  jose 1.11.10
  jsx 3.1.0
  kubereq 0.3.2
  livebook 0.15.3
  mime 2.0.6
  mint 1.7.1
  mint_web_socket 1.0.4
  nimble_options 1.1.1
  nimble_pool 1.1.0
  phoenix 1.7.18
  phoenix_ecto 4.6.3
  phoenix_html 4.2.0
  phoenix_live_dashboard 0.8.6
  phoenix_live_view 1.0.2
  phoenix_pubsub 2.1.3
  phoenix_template 1.0.4
  plug 1.16.1
  plug_crypto 2.1.0
  pluggable 1.1.0
  protobuf 0.13.0
  req 0.5.8
  telemetry 1.3.0
  telemetry_metrics 1.0.0
  telemetry_poller 1.1.0
  thousand_island 1.3.11
  websock 0.5.3
  websock_adapter 0.5.8
  yamerl 0.10.0
  yaml_elixir 2.11.0
* Getting livebook (Hex package)
* Getting aws_credentials (Hex package)
* Getting bandit (Hex package)
* Getting dns_cluster (Hex package)
* Getting earmark_parser (Hex package)
* Getting ecto (Hex package)
* Getting jose (Hex package)
* Getting kubereq (Hex package)
* Getting mint_web_socket (Hex package)
* Getting phoenix (Hex package)
* Getting phoenix_ecto (Hex package)
* Getting phoenix_html (Hex package)
* Getting phoenix_live_dashboard (Hex package)
* Getting phoenix_live_view (Hex package)
* Getting plug (Hex package)
* Getting plug_crypto (Hex package)
* Getting protobuf (Hex package)
* Getting req (Hex package)
* Getting telemetry_metrics (Hex package)
* Getting telemetry_poller (Hex package)
* Getting yaml_elixir (Hex package)
* Getting yamerl (Hex package)
* Getting telemetry (Hex package)
* Getting finch (Hex package)
* Getting jason (Hex package)
* Getting mime (Hex package)
* Getting mint (Hex package)
* Getting nimble_options (Hex package)
* Getting nimble_pool (Hex package)
* Getting hpax (Hex package)
* Getting phoenix_template (Hex package)
* Getting castore (Hex package)
* Getting phoenix_pubsub (Hex package)
* Getting websock_adapter (Hex package)
* Getting websock (Hex package)
* Getting fresh (Hex package)
* Getting pluggable (Hex package)
* Getting decimal (Hex package)
* Getting thousand_island (Hex package)
* Getting eini (Hex package)
* Getting iso8601 (Hex package)
* Getting jsx (Hex package)
You have added/upgraded packages you could sponsor, run `mix hex.sponsor` to learn more
Resolving Hex dependencies...
Resolution completed in 0.198s
Unchanged:
  aws_credentials 0.3.2
  bandit 1.6.5
  castore 1.0.12
  decimal 2.3.0
  dns_cluster 0.1.3
  earmark_parser 1.4.42
  ecto 3.12.5
  eini_beam 2.2.4
  finch 0.19.0
  fresh 0.4.4
  hpax 1.0.2
  iso8601 1.3.4
  jason 1.4.4
  jose 1.11.10
  jsx 3.1.0
  kubereq 0.3.2
  mime 2.0.6
  mint 1.7.1
  mint_web_socket 1.0.4
  nimble_options 1.1.1
  nimble_pool 1.1.0
  phoenix 1.7.18
  phoenix_ecto 4.6.3
  phoenix_html 4.2.0
  phoenix_live_dashboard 0.8.6
  phoenix_live_view 1.0.2
  phoenix_pubsub 2.1.3
  phoenix_template 1.0.4
  plug 1.16.1
  plug_crypto 2.1.0
  pluggable 1.1.0
  protobuf 0.13.0
  req 0.5.8
  telemetry 1.3.0
  telemetry_metrics 1.0.0
  telemetry_poller 1.1.0
  thousand_island 1.3.11
  websock 0.5.3
  websock_adapter 0.5.8
  yamerl 0.10.0
  yaml_elixir 2.11.0
All dependencies are up to date
==> earmark_parser
Compiling 2 files (.xrl)
Compiling 1 file (.yrl)
Compiling 3 files (.erl)
Compiling 47 files (.ex)
Generated earmark_parser app
==> pluggable
Compiling 4 files (.ex)
Generated pluggable app
==> decimal
Compiling 4 files (.ex)
Generated decimal app
==> mime
Compiling 1 file (.ex)
Generated mime app
==> livebook
===> Analyzing applications...
===> Compiling iso8601
==> nimble_options
Compiling 3 files (.ex)
Generated nimble_options app
==> livebook
===> Fetching rebar3_hex v7.0.8
===> Fetching hex_core v0.10.1
===> Fetching verl v1.1.1
===> Analyzing applications...
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Analyzing applications...
===> Compiling eini
===> Analyzing applications...
===> Compiling telemetry
==> telemetry_metrics
Compiling 7 files (.ex)
Generated telemetry_metrics app
==> livebook
===> Analyzing applications...
===> Compiling telemetry_poller
==> thousand_island
Compiling 16 files (.ex)
Generated thousand_island app
==> jason
Compiling 10 files (.ex)
Generated jason app
==> phoenix_html
Compiling 6 files (.ex)
Generated phoenix_html app
==> phoenix_template
Compiling 4 files (.ex)
Generated phoenix_template app
==> phoenix_pubsub
Compiling 11 files (.ex)
Generated phoenix_pubsub app
==> plug_crypto
Compiling 5 files (.ex)
Generated plug_crypto app
==> hpax
Compiling 4 files (.ex)
Generated hpax app
==> livebook
===> Analyzing applications...
===> Compiling yamerl
==> yaml_elixir
Compiling 6 files (.ex)
Generated yaml_elixir app
==> dns_cluster
Compiling 1 file (.ex)
Generated dns_cluster app
==> jose
Compiling 112 files (.erl)
Compiling 8 files (.ex)
Generated jose app
==> livebook
===> Analyzing applications...
===> Compiling jsx
===> Fetching rebar3_lint v3.0.1
===> Fetching elvis_core v3.0.1
===> Fetching katana_code v2.0.2
===> Fetching zipper v1.0.1
===> Analyzing applications...
===> Compiling zipper
===> Compiling katana_code
===> Compiling elvis_core
===> Compiling rebar3_lint
===> Analyzing applications...
===> Compiling aws_credentials
src/aws_credentials.erl:6:2: Warning: the callback gen_server:format_status(_,_) is deprecated; use format_status/1 instead

==> ecto
Compiling 56 files (.ex)
Generated ecto app
==> plug
Compiling 1 file (.erl)
Compiling 40 files (.ex)
Generated plug app
==> protobuf
Compiling 38 files (.ex)
     warning: false.encode/1 is undefined (module false is not available or is yet to be defined)
     │
 174 │       with {:ok, map} <- to_encodable(struct, opts), do: jason.encode(map)
     │                                                                ~
     │
     └─ lib/protobuf/json.ex:174:64: Protobuf.JSON.encode/2

     warning: false.decode/1 is undefined (module false is not available or is yet to be defined)
     │
 283 │       with {:ok, json_data} <- jason.decode(iodata),
     │                                      ~
     │
     └─ lib/protobuf/json.ex:283:38: Protobuf.JSON.decode/2

Generated protobuf app
==> nimble_pool
Compiling 2 files (.ex)
Generated nimble_pool app
==> castore
Compiling 1 file (.ex)
Generated castore app
==> mint
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated mint app
==> mint_web_socket
Compiling 7 files (.ex)
Generated mint_web_socket app
==> finch
Compiling 14 files (.ex)
Generated finch app
==> req
Compiling 17 files (.ex)
Generated req app
==> fresh
Compiling 5 files (.ex)
Generated fresh app
==> kubereq
Compiling 30 files (.ex)
Generated kubereq app
==> websock
Compiling 1 file (.ex)
Generated websock app
==> bandit
Compiling 53 files (.ex)
Generated bandit app
==> websock_adapter
Compiling 4 files (.ex)
Generated websock_adapter app
==> phoenix
Compiling 71 files (.ex)
Generated phoenix app
==> phoenix_live_view
Compiling 39 files (.ex)
Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 36 files (.ex)
Generated phoenix_live_dashboard app
==> phoenix_ecto
Compiling 7 files (.ex)
Generated phoenix_ecto app
==> livebook
Compiling 293 files (.ex)
Generated livebook app
Generated priv/static with compressed files from static
Generated priv/iframe_static with compressed files from iframe/priv/static/iframe
Generated escript livebook with MIX_ENV=prod
Are you sure you want to install "livebook"? [Yn] y
* creating /home/ore/.asdf/installs/elixir/1.18.3-otp-27/.mix/escripts/livebook


```

# 起動

```
$  . "$HOME/.asdf/asdf.sh"

$ $ /home/ore/.asdf/installs/elixir/1.18.3-otp-27/.mix/escripts/livebook server

[Livebook] Application running at http://localhost:8080/?token=o2isrwe6itg7564c3zvpyejyudujp6dv


```


以上。