node.js - 本地:-A:无效选项
问题描述
我无法在新的 macOS(M1 芯片)上安装带有asdf的 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 大苏尔 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 "lts\t%s\n" "$version"
aliases[lts]="$version"
fi
解决方案
brew install bash
推荐阅读
- haskell - 为 RoseTree 定义 fmap
- mysql - 错误代码:1822。添加外键约束失败。引用表 'Collection' 中的约束 'employee_ibfk_1' 缺少索引
- flutter - MaterialApp中的路由是否需要添加页面?
- python - Python:如何使用鼠标和键盘事件查看 pdf 并在其上创建注释?
- c++ - 如何在二进制数的开头添加零
- linux - 另一个 postgres 未启动:“无法映射匿名共享内存”
- android - 如何使用 where 通过 DocumentReference 删除文档?安卓工作室
- pyspark - 输入与进程行在 pyspark 流编写器中显示为 0?
- c++ - PCL中的computeFeature函数在哪里修改?
- javascript - 如何在反应原生 iOS 模块中访问 AppDelegate 方法