gpt4 book ai didi

node.js - 如何在 Mac 上安装 NVM

转载 作者:行者123 更新时间:2023-12-05 01:52:01 24 4
gpt4 key购买 nike

我正在尝试使用以下命令在我的 Mac 上安装 NVM:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

但是,我收到一条错误消息:"syntax error near unexpected `("。下面提供了有关错误日志的更多详细信息。什么是我做错了吗?

VFZ:repo2022 john$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4934 100 4934 0 0 686 0 0:00:07 0:00:07 --:--:-- 686
bash: line 1: syntax error near unexpected token `('
bash: line 1: `<!-- Copyright (C) 2016 Intel Corporation. All rights reserved. -->'
VFZ:repo2022 john$

系统 - MAC

最佳答案

有一个使用“Rosetta 2”的解决方案从终端:

$ sudo softwareupdate --install-rosetta

使用 curl 安装 NVM(在 NVM 自述文件中找到)

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

然后安装任何 Node 版本(例如安装最新版本)

$ nvm install node

检查 Node 版本

$ node -v

来源:https://dev.to/httpjunkie/setup-node-version-manager-nvm-on-mac-m1-7kl

关于node.js - 如何在 Mac 上安装 NVM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71846697/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com