通过 Homebrew 安装 `Node.js` 比直接在 macOS 上安装是否明智?
Is it sensible to install `Node.js` through Homebrew rather than directly on macOS?
多年来我了解到有些软件包我不应该通过 Homebrew 或 MacPorts 安装:
- 对于complicated reasons TeX/LaTeX should be installed directly,不通过HB/MP。
- 通过实验,似乎Qt也应该直接安装
对于 Python 我持观望态度。我更喜欢单独安装它。但是像 Qt 一样,依赖它的 brew 包无论如何都会安装 Python 或 Qt。然后是确保 PATH
设置正确的问题。
我对Node.js
、npm
、webpack
的经验还是太少了。你能分享你的经验吗? Node.js
&co 通过 Homebrew 或 directly 安装哪个更容易维护?
相关: .
如果 Homebrew
下的 Node.js
在 macOS 升级后给您带来麻烦
~/ > node
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.67.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
Abort trap: 6
然后
~/ > brew info icu4c
icu4c: stable 67.1 (bottled) [keg-only]
...
其次是
~/ > brew switch icu4c 67.1
Warning: Calling `brew switch` is deprecated! Use `brew link` @-versioned formulae instead.
Cleaning /usr/local/Cellar/icu4c/67.1
Opt link created for /usr/local/Cellar/icu4c/67.1
和node
将再次运行。
~/ > node
Welcome to Node.js v15.3.0.
多年来我了解到有些软件包我不应该通过 Homebrew 或 MacPorts 安装:
- 对于complicated reasons TeX/LaTeX should be installed directly,不通过HB/MP。
- 通过实验,似乎Qt也应该直接安装
对于 Python 我持观望态度。我更喜欢单独安装它。但是像 Qt 一样,依赖它的 brew 包无论如何都会安装 Python 或 Qt。然后是确保 PATH
设置正确的问题。
我对Node.js
、npm
、webpack
的经验还是太少了。你能分享你的经验吗? Node.js
&co 通过 Homebrew 或 directly 安装哪个更容易维护?
相关:
如果 Homebrew
下的 Node.js
在 macOS 升级后给您带来麻烦
~/ > node
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.67.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
Abort trap: 6
然后
~/ > brew info icu4c
icu4c: stable 67.1 (bottled) [keg-only]
...
其次是
~/ > brew switch icu4c 67.1
Warning: Calling `brew switch` is deprecated! Use `brew link` @-versioned formulae instead.
Cleaning /usr/local/Cellar/icu4c/67.1
Opt link created for /usr/local/Cellar/icu4c/67.1
和node
将再次运行。
~/ > node
Welcome to Node.js v15.3.0.