#author("2020-06-30T14:03:24+00:00","default:admin","admin") -[[ElixirでIoT#4.1:Nerves開発環境の準備(2020年4月版):https://qiita.com/takasehideki/items/88dda57758051d45fcf9]] -[[Windows環境にElixirをインストールする:https://npnl.hatenablog.jp/entry/2019/12/11/190955?utm_source=feed]] -[[Elixir をインストール:https://elixir-lang.jp/install.html]] *[[asdf:https://asdf-vm.com/]]のインストール [#ha6425d5] $ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.8 $ echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc $ echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc $ . .bashrc $ sudo apt install automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev unzip curl $ sudo apt install make libncurses5-dev $ sudo apt install build-essential automake autoconf git squashfs-tools ssh-askpass pkg-config curl $ sudo apt install fop xsltproc libxml2-utils *Erlang, Elixirのインストール [#l8546963] $ asdf plugin-add erlang $ asdf plugin-add elixir $ asdf install erlang 22.3.2 $ asdf install elixir 1.10.3-otp-22 $ asdf global erlang 22.3.2 $ asdf global elixir 1.10.3-otp-22 -これはまだ早そう $ asdf install erlang 23.0.1 $ asdf install elixir 1.10.3-otp-23 $ asdf global erlang 23.0.1 $ asdf global elixir 1.10.3-otp-23 *バージョン確認 [#ie7e99bf] $ iex Erlang/OTP 23 [erts-11.0.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> -Ctrl+C を2回連続で入力して終了 *Phoenixのインストール [#sd393a73] $ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - $ sudo apt-get install -y nodejs $ sudo npm install npm@latest -g $ mix local.hex --force $ mix local.rebar --force $ mix archive.install hex phx_new 1.5.1 --force *Nervesのインストール [#z6675a89] $ mix archive.install hex nerves_bootstrap $ sudo apt install build-essential automake autoconf git squashfs-tools ssh-askpass $ wget https://github.com/fhunleth/fwup/releases/download/v1.7.0/fwup_1.7.0_amd64.deb $ sudo dpkg -i fwup_1.7.0_amd64.deb **WSLの場合 [#p7b07823] -[[ElixirでIoT#4.1.1:WSL 2でNerves開発環境を整備する:https://qiita.com/takasehideki/items/b8ea8b3455c70398178a]]