1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rvenvをアンインストールして今後anyenvで**env管理する

Last updated at Posted at 2019-06-04

環境

Ubuntu(WSL)

anyenvとは

○○env系を管理してくれる便利なソフト
anyenv install ○○で何でも楽にインストールできる!
https://github.com/anyenv/anyenv

インストール

以下WSLのubuntuの環境で作業していきます。OSごとのインストール方法はgithub

$ git clone https://github.com/anyenv/anyenv ~/.anyenv
# pathの設定
$ echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bashrc
# シェルの設定
$ echo 'eval "$(anyenv init -)"' >> ~/.bashrc
# シェル再起動
$ exec $SHELL -l

# インストールの確認
$ anyenv -v
anyenv 1.1.0

再起動後、こんなのが出てくるから、指示通りコマンドを実行

$ exec $SHELL -l
ANYENV_DEFINITION_ROOT(/home/sasa/.config/anyenv/anyenv-install) doesn't exist. You can initialize it by:
> anyenv install --init

$ anyenv install --init

自動でアップデートしてくれるプラグインをインストール

$ mkdir -p $(anyenv root)/plugins
$ git clone https://github.com/znz/anyenv-update.git $(anyenv root)/plugins/anyenv-update
$ exec $SHELL -l

インストールできる**envを見てみる

$ anyenv install -l
  Renv
  crenv
  denv
  erlenv
  exenv
  goenv
  hsenv
  jenv
  luaenv
  nodenv
  phpenv
  plenv
  pyenv
  rbenv
  sbtenv
  scalaenv
  swiftenv

既にrbenvが入っている場合、rbenvを消しちゃう

$ rm -rf ~/.rbenv
$ rbenv -v
Command 'rbenv' not found...

anyenv install hogeでインストールできます。詳しくはanyenv -hで!

**envをインストールした後は
exec $SHELL -lで再起動をお忘れなく!

参考サイト

nodenvのインストールについて記載されています
http://dslab.work/2019/04/21/post-114/
macでのanyenvのインストールについて記載されています
https://qiita.com/fuku_tech/items/17d65344a36a08bafc69

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?