安装纱线获得&#brew; brew link节点'

时间:2017-02-28 17:11:40

标签: hyperlink homebrew yarn

当我尝试通过家庭酿造安装纱线时。得到以下消息

My-MacBook-Pro:share gt$ brew install yarn
Error: You must `brew link node` before yarn can be installed
My-MacBook-Pro:share gt$ 

运行brew链接节点导致

My-MacBook-Pro:share gt$ brew link node
Linking /usr/local/Cellar/node/7.6.0... 
Error: Could not symlink bin/node
Target /usr/local/bin/node
already exists. You may want to remove it:
  rm '/usr/local/bin/node'

To force the link and overwrite all conflicting files:
  brew link --overwrite node

To list all files that would be deleted:
  brew link --overwrite --dry-run node
My-MacBook-Pro:share gt$ 

所以我尝试了覆盖选项

My-MacBook-Pro:share gt$ brew link --overwrite node
Linking /usr/local/Cellar/node/7.6.0... 
Error: Could not symlink share/doc/node/gdbinit
/usr/local/share/doc/node is not writable.
My-MacBook-Pro:share gt$ 

在/ usr / local / share上做了一个chmod,然后抱怨/ usr / local / lib / dtrace不可写

我是在正确的道路上还是只是一个兔子洞?什么是干净的纱线安装方式?

1 个答案:

答案 0 :(得分:2)

在macOS和通用Unix环境中安装Yarn的最简单方法之一是通过我们的shell脚本。您可以通过在终端中运行以下代码来安装Yarn:

curl -o- -L https://yarnpkg.com/install.sh | bash