2017-02-28 84 views
2

当我试图通过家庭酿造安装纱线。得到了以下消息安装纱线'brew link节点'

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

运行造成

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

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

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