JavaEar 专注于收集分享传播有价值的技术资料

我该怎么办" brew link fish" (How can i do "brew link fish")

I am using "brew install fish" to install the fish, but it gave me an error:

Error: The brew link step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink . /usr/local/opt is not writable.

You can try again using: brew link fish

So I did "brew link fish", however it is said

Error: Could not symlink . /usr/local/opt is not writable.

The problem is i don't have /usr/local/opt on my computer, am i missing something? How can I link fish to shell?

Thanks!

2个回答

    最佳答案

  1. 英文原文

    Alright. It turns out brew does not like sudo, but brew do need to run at "local", so I changed my path to local in terminal, then redo this, then it works.

    sudo chown -R whoami /usr/local


    中文翻译

    好的。事实证明brew不喜欢sudo,但brew需要在" 本地" 运行,所以我将路径改为终端本地路径,然后重做,然后就可以了。

      

    sudo chown -R whoami / usr / local

    Alright. It turns out brew does not like sudo, but brew do need to run at "local", so I changed my path to local in terminal, then redo this, then it works.

    sudo chown -R whoami /usr/local

    好的。事实证明brew不喜欢sudo,但brew需要在" 本地" 运行,所以我将路径改为终端本地路径,然后重做,然后就可以了。

      

    sudo chown -R whoami / usr / local

  2. 参考答案2
  3. This worked for me

    sudo chown -R (whoami) /usr/local