wslでelixir その67

# 概要
wsl(wsl2じゃない)で、elixirやってみた。
livebookやってみた。

# 写真


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/18104/bc888f94-5b3e-12aa-17a1-d9b6701ed9ef.png)



# 手順

```
$ mix escript.install hex livebook
Resolving Hex dependencies...
Resolution completed in 1.061s
New:
  aws_signature 0.3.1
  castore 1.0.3
  cowboy 2.10.0
  cowboy_telemetry 0.4.0
  cowlib 2.12.1
  decimal 2.1.1
  earmark_parser 1.4.32
  ecto 3.10.2
  finch 0.16.0
  hpax 0.1.2
  jason 1.4.0
  jose 1.11.5
  livebook 0.10.0
  mime 2.0.5
  mint 1.5.1
  mint_web_socket 1.0.3
  nimble_options 1.0.2
  nimble_pool 1.0.0
  phoenix 1.7.5
  phoenix_ecto 4.4.2
  phoenix_html 3.3.1
  phoenix_live_dashboard 0.8.0
  phoenix_live_view 0.19.3
  phoenix_pubsub 2.1.3
  phoenix_template 1.0.3
  plug 1.14.2
  plug_cowboy 2.6.1
  plug_crypto 1.2.5
  protobuf 0.8.0
  ranch 1.8.0
  req 0.3.8
  telemetry 1.2.1
  telemetry_metrics 0.6.1
  telemetry_poller 1.0.0
  websock 0.5.3
  websock_adapter 0.5.4
* Getting livebook (Hex package)
* Getting aws_signature (Hex package)
* Getting castore (Hex package)
* Getting earmark_parser (Hex package)
* Getting ecto (Hex package)
* Getting jason (Hex package)
* Getting jose (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_cowboy (Hex package)
* Getting protobuf (Hex package)
* Getting req (Hex package)
* Getting telemetry_metrics (Hex package)
* Getting telemetry_poller (Hex package)
* Getting telemetry (Hex package)
* Getting finch (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 cowboy (Hex package)
* Getting cowboy_telemetry (Hex package)
* Getting plug (Hex package)
* Getting plug_crypto (Hex package)
* Getting cowlib (Hex package)
* Getting ranch (Hex package)
* Getting phoenix_template (Hex package)
* Getting phoenix_pubsub (Hex package)
* Getting websock_adapter (Hex package)
* Getting websock (Hex package)
* Getting decimal (Hex package)
You have added/upgraded packages you could sponsor, run `mix hex.sponsor` to learn more
Resolving Hex dependencies...
Resolution completed in 0.165s
Unchanged:
  aws_signature 0.3.1
  castore 1.0.3
  cowboy 2.10.0
  cowboy_telemetry 0.4.0
  cowlib 2.12.1
  decimal 2.1.1
  earmark_parser 1.4.32
  ecto 3.10.2
  finch 0.16.0
  hpax 0.1.2
  jason 1.4.0
  jose 1.11.5
  mime 2.0.5
  mint 1.5.1
  mint_web_socket 1.0.3
  nimble_options 1.0.2
  nimble_pool 1.0.0
  phoenix 1.7.5
  phoenix_ecto 4.4.2
  phoenix_html 3.3.1
  phoenix_live_dashboard 0.8.0
  phoenix_live_view 0.19.3
  phoenix_pubsub 2.1.3
  phoenix_template 1.0.3
  plug 1.14.2
  plug_cowboy 2.6.1
  plug_crypto 1.2.5
  protobuf 0.8.0
  ranch 1.8.0
  req 0.3.8
  telemetry 1.2.1
  telemetry_metrics 0.6.1
  telemetry_poller 1.0.0
  websock 0.5.3
  websock_adapter 0.5.4
All dependencies are up to date
==> earmark_parser
Compiling 1 file (.yrl)
Compiling 2 files (.xrl)
Compiling 3 files (.erl)
Compiling 46 files (.ex)
Generated earmark_parser app
==> livebook
Could not find "rebar3", which is needed to build dependency :aws_signature
I can install a local copy which is just used by Mix
Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn] y
* creating /home/ore/.mix/elixir/1-14/rebar3
===> Analyzing applications...
===> Compiling aws_signature
==> decimal
Compiling 4 files (.ex)
Generated decimal app
==> mime
Compiling 1 file (.ex)
Generated mime app
==> nimble_options
Compiling 3 files (.ex)
Generated nimble_options app
===> Analyzing applications...
===> Compiling telemetry
==> telemetry_metrics
Compiling 7 files (.ex)
Generated telemetry_metrics app
===> Analyzing applications...
===> Compiling telemetry_poller
==> jason
Compiling 10 files (.ex)
Generated jason 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
==> jose
Compiling 112 files (.erl)
Compiling 8 files (.ex)
Generated jose app
===> Analyzing applications...
===> Compiling ranch
==> ecto
Compiling 56 files (.ex)
Generated ecto app
==> plug
Compiling 1 file (.erl)
Compiling 40 files (.ex)
Generated plug app
==> phoenix_html
Compiling 9 files (.ex)
Generated phoenix_html app
==> phoenix_template
Compiling 4 files (.ex)
Generated phoenix_template app
==> protobuf
Compiling 34 files (.ex)
warning: use Bitwise is deprecated. import Bitwise instead
  lib/protobuf/wire/varint.ex:46: Protobuf.Wire.Varint

warning: use Bitwise is deprecated. import Bitwise instead
  lib/protobuf/wire/zigzag.ex:4: Protobuf.Wire.Zigzag

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 19 files (.ex)
Generated mint app
==> mint_web_socket
Compiling 7 files (.ex)
Generated mint_web_socket app
==> finch
Compiling 13 files (.ex)
Generated finch app
==> req
Compiling 5 files (.ex)
Generated req app
==> websock
Compiling 1 file (.ex)
Generated websock app
===> Analyzing applications...
===> Compiling cowlib
===> Analyzing applications...
===> Compiling cowboy
===> Analyzing applications...
===> Compiling cowboy_telemetry
==> plug_cowboy
Compiling 5 files (.ex)
Generated plug_cowboy app
==> websock_adapter
Compiling 2 files (.ex)
Generated websock_adapter app
==> phoenix
Compiling 71 files (.ex)
Generated phoenix app
==> phoenix_live_view
Compiling 35 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 206 files (.ex)
warning: Logger.Formatter.new/0 is undefined or private
  lib/livebook/runtime/erl_dist/node_manager.ex:104: Livebook.Runtime.ErlDist.NodeManager.init/1

Generated livebook app
Generated escript livebook with MIX_ENV=prod
Are you sure you want to install "livebook"? [Yn] y
* creating /home/ore/.mix/escripts/livebook

warning: you must append "/home/ore/.mix/escripts" to your PATH if you want to invoke escripts by name

```

# 起動

```
$ /home/ore/.mix/escripts/livebook server
[Livebook] Application running at http://localhost:8080/?token=wcazrs4nmamr6tbvm4utfu2ffdbandrt

```

以上。