スポンサーリンク

2015年7月20日

[Elixir]Windows環境でパッケージ管理ツール(hex)をアップデート!!

Goal

WindowsでElixirのパッケージ管理ツール(hex)をアップデートする。

Dev-Environment

OS: Windows8.1
Erlang: Eshell V6.4, OTP-Version 17.5
Elixir: v1.0.4

Wait a minute

なんかアップデートしろよ!って言われてたからアップデートする。
こっちはそんなに影響ないので・・・

Index

  1. Procedure of update

1. Procedure of update

mix deps.get した時、以下のような結果が出た。
>mix deps.get
[33mA new Hex version is available (v0.8.3), please update with `mix local.hex`[0m
hexの新しいバージョンがあるから、
mix local.hex を実行してアップデートしろよって言ってる。
>mix local.hex
Found existing archive(s): hex.ez.
Are you sure you want to replace them? [Yn] y
** (Mix) Unable to overwrite open archives on Windows. Please manually remove the existing archive at "c:/Users/UserName/.mix/archives/hex.ez" and run this command again. In case
re-running the command still does not work, please fetch the archive at "https://s3.amazonaws.com/s3.hex.pm/installs/1.0.0/hex.ez" and manually copy it to "c:/Users/UserName/.mix/
archives/hex.ez".
あれ?できてなくね?
説明を読んでみると・・・・
Windowsだと開いてるファイル上書きできてねーんだよ!!
だから手動で既存のアーカイブを削除してね!!
そして、同じコマンド実行してね!!
(後は、再実行できなかったら手動でhexのアーカイブをコピーしてきてねってところか)
って言ってる。
仕方がないから、指定されてるファイルを削除(リネームでも可)しにいく。
説明文中にあった指定されているファイルのパス
(私の環境の場合、以下にある)
Example: c:/Users/UserName/.mix/archives/hex.ez
Description: UserNameは各環境のユーザ名に置き換えて下さい。
よし削除完了。
再度コマンドを実行する。
>mix local.hex
Are you sure you want to install archive https://s3.amazonaws.com/s3.hex.pm/installs/1.0.0/hex.ez? [Yn] y
* creating c:/Users/Takes_000/.mix/archives/hex.ez
できたみたいだ。
一応バージョンを確認する。
>mix hex
Hex v0.8.3
Hex is a package manager for the Erlang ecosystem.

Further information can be found here: https://hex.pm/docs/tasks

Speaking to oneself

そういえば、archiveにあるphoenixのアップデートとかどうやるんだろう・・・
同じく既存のアーカイブを消して再インストールの形を取ればいいんだろうか・・・

Bibliography

なし

人気の投稿