Error: node: unknown or unsupported macOS version: :dunno 错误解决

一、原因

今天安装

brew install node

报错了,错误信息如下:
在这里插入图片描述

二、解决方案

1)查找homebrew-cask安装位置

echo $(brew --repo homebrew/homebrew-cask)
// 输出
/opt/homebrew/Library/Taps/homebrew/homebrew-cask

2)使用 git fetch --unshallow命令,将浅复制的存储库转换为完整的存储库,即将历史记录中所有的提交、分支和标签都拉取到本地。

git -C /opt/homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

3)更新 brew

brew update

再安装node就可以了

猜你喜欢

转载自blog.csdn.net/a549654065/article/details/133436380