コンテンツへスキップ →

$ asdf installでjq: command not foundエラーになる問題の解決法

asdfでflutterをバージョン管理している環境でエラーが発生しました。

エラーの再現

$ asdf plugin add flutter

flutterのpluginを追加する。

$ asdf install

/Users/xxx/.asdf/plugins/flutter/bin/install: line 25: jq: command not found
/Users/xxx/.asdf/plugins/flutter/bin/install: line 26: jq: command not found
/Users/xxx/.asdf/plugins/flutter/bin/install: line 27: [: -gt: unary operator expected
Cannot find the download url for the version: 2.8.1-stable

asdfでflutterをインストールする。

line 25: jq: command not found というエラーが出てます。
asdfの中でjqを使っているみたいです。

解決法

$ brew install jq

homebrewでjqをインストールします。
インストール後に再度、$ asdf install をしたら無事Flutterをインストールすることができました。

参考

カテゴリー: Flutter コマンドライン