我在新的macOS (M1芯片)上安装Node.js失败。我该如何解决这个问题?我的工作环境似乎很普通。
$ asdf install nodejs 14.15.4
/Users/stefan/.asdf/plugins/nodejs/bin/../lib/utils.sh: line 35: local: -A: invalid option
local: usage: local name[=value] ...
/Users/stefan/.asdf/plugins/nodejs/bin/../lib/utils.sh: line 51: Fermium: unbound variable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3490 0 3490 0 0 37934 0 --:--:-- --:--:-- --:--:-- 37934
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10858 0 10858 0 0 106k 0 --:--:-- --:--:-- --:--:-- 107k
Binary not found for version 14.15.4
- macOS Big Sur 11.1
- asdf v0.8.0
家酿2.7.5- zsh
调试utils.sh第35行
local -A aliases
utils.sh的第51行
if [ -z "${aliases[lts]:-}" ]; then
printf "ltst%sn" "$version"
aliases[lts]="$version"
fi
brew install bash
详细信息:https://github.com/asdf-vm/asdf-nodejs/issues/199