[英]Unable to link/run Node.js v6 in Homebrew
我正在嘗試專門安裝Node.js v6,這被證明是令人困惑的。
在運行Sierra的新MacBook上,我運行了: brew install node@6
這給了我:
Please note by default only English locale support is provided. If you need
full locale support you should either rebuild with full icu:
`brew reinstall node --with-full-icu`
or add full icu data at runtime following:
https://github.com/nodejs/node/wiki/Intl#using-and-customizing-the-small-icu-build
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/node@6/bin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/node@6/lib
CPPFLAGS: -I/usr/local/opt/node@6/include
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/node@6/6.9.5: 3,891 files, 41.3M
如果我運行which node
,我node not found
。 如果我運行brew link node
,我得到Error: No such keg: /usr/local/Cellar/node
。 我還運行了sudo chown -R $USER /usr/local
。
如何“鏈接”Node.js v6以便其他軟件可以找到它? 我是否運行echo 'export PATH="/usr/local/opt/node@6/bin:$PATH"' >> ~/.zshrc
? 我不想跑任何我不確定的東西。
不要使用Homebrew來安裝節點。
我喜歡節點版本管理器(NVM) ,並且有n (如評論中@ntalbs所述)。 這些是Mac上節點的更好選擇,以避免確定 。 問題 。 以后 。
注意,您可以通過Homebrew安裝nvm
和n
。 ( brew install nvm
或brew install n
)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.