惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

講評世界

My App Defaults 2023 读书的意义 そして、次の曲が始まるのです 从零开始的 RSSHub Docker 私有化部署指南 使用 Homebrew 安装 Typora 的 0.11.18 版本 使用 TypeScript 为 Vue 组件的 prop 标注类型 【译文】Grid 用于布局, Flexbox 用于组件 【译文】IndexedDB 为什么这么慢?如何更好的使用呢? Hello 2022 「他山之石」零贰 「他山之石」零壹 「言論」 零壹 给 icarus 主题增加所有文章的字数统计 hexo 无法在本地实时预览 JavaScript 立即调用的函数表达式(IIFE) 解决 nvm 无法在 arm 架构下安装 V15 以下的 node 版本 的问题 如何在 JavaScript 完美的确定一个数据的类型 Cookie?小饼干! 使用 RSS 在推荐算法中获取主动权
m1 芯片安装 nvm 提示 command not found
Moeyua · 2021-11-05 · via 講評世界

最近新购入了一台 M1 的 MacBook Air,作为一个合格的程序员自然是先配置环境,但是没想到第一个安装的 nvm 上来就给了我当头一棒。

首先根据 nvm给出的文档下载:

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

下载完成,键入 nvm 测试一下是否成功,果不其然,报错:

command not found: nvm

那就看一下是哪里的问题吧,查了一下,似乎是没有 .bash_profile 这个文件造成的。

那好办,创建一个就完了:

touch ~/.bash_profile

创建完根据文档的说法是需要再运行一次安装命令,之后 source ~./bash_profile 让配置生效即可。

If you use bash, the previous default shell, your system may not have a .bash_profile file where the command is set up. Create one with touch ~/.bash_profile and run the install script again. Then, run source ~/.bash_profile to pick up the nvm command.

执行完上述操作后好像没什么问题了,那么试一下 nvm,ok 成功了。


似乎问题到这里就结束了,但很遗憾并没有。

在几分钟之后,我再次打开 Terminal 准备安装 node 的时候,习惯性先输入 nvm,这时候怪事发生了:

zsh: command not found: nvm

这是怎么回事呢,按照前面的再来一遍,正常了;重启 Terminal 输入 nvm, 报错。

试了好几次,都是一样的结果。这个时候就有点急了,这是怎么会事呢?翻来覆去查了好多资料也没结果,这个时候,文档上的一句话给了我提示:

Since macOS 10.15, the default shell is zsh and nvm will look for .zshrc to update, none is installed by default. Create one with touch ~/.zshrc and run the install script again. 也就是说我现在使用的是 zsh 而不是 bash,所以 nvm 会寻找 .zshrc。那么这就好解决了:

touch ~/.zshrc

运行安装命令,vim .zshrc 查看一下文件确实有写入,输入 nvm 也正常,再次重启 Terminal,一切 ok。


还是要仔细看文档,google 了一圈啥用没有,文档啥都写清楚了😅