LoginSignup
1
1

More than 1 year has passed since last update.

fvm インストール

Posted at

公式Document
https://fvm.app/docs/getting_started/installation
に従って

brew tap leoafarias/fvm
brew install fvm

を実行したがエラー

Error: Can't create update lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
  sudo chown -R $(whoami) /usr/local/var/homebrew
==> Tapping leoafarias/fvm
fatal: could not create leading directories of '/usr/local/Homebrew/Library/Taps/leoafarias/homebrew-fvm': Permission denied
Error: Failure while executing; `git clone https://github.com/leoafarias/homebrew-fvm /usr/local/Homebrew/Library/Taps/leoafarias/homebrew-fvm --origin=origin` exited with 128.

このエラーはこの対応を行った

sudo chown -R $(whoami) $(brew --prefix)/*

次にCommand Line Tools のバージョンに関するエラーメッセージ

Error: Your Command Line Tools are too outdated.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.
You should download the Command Line Tools for Xcode 12.5.

Error: Your Command Line Tools (CLT) does not support macOS 11.
It is either outdated or was modified.
Please update your Command Line Tools (CLT) or delete it if no updates are available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.
You should download the Command Line Tools for Xcode 12.5.

素直にCommand Line Tools for Xcode 12.5. を入れて再実行(Xcode12.5も)

brew install fvm

fvmのインストールが成功したらfvmからflutterをインストール

利用可能なバージョン

fvm releases

1.22.6 と 2.2.1 をインストール

fvm install 1.22.6
fvm install 2.2.1

インストールされていることを確認

fvm list

指定のバージョンをグローバルのデフォルトに設定

fvm use 1.22.6 global

(fvmの1系では --global だったような気がするので変わった?)

PATHにデフォルトのflutterを追加するときは以下を追加

$HOME/fvm/default/bin
1
1
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
1