2017-02-28 82 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