Brew 错误:无法符号链接,路径不可写 [英] Brew error: Could not symlink, path is not writable
问题描述
当我尝试使用 homebrew (brew install aLibrary
) 安装库时,出现以下错误:
When I try to install a library with homebrew (brew install aLibrary
), I got the following error:
Could not symlink lib/pkgconfig/aFile
/usr/local/lib/pkgconfig is not writable.
我该怎么办?
有几个问题和答案(1,2 等)关于这个 brew 错误,这是一个尝试按照此处的建议提出一般性问题.
There are several questions and answers (1,2,etc.) concerning this brew error, this is an attempt to make a general question as suggested here.
推荐答案
从 brew doctor
开始,它将显示您的 brew 设置错误.
Start with brew doctor
which will show you errors with your brew setup.
您可能会看到如下内容:警告:/usr/local/lib/pkgconfig 不可写."
You might see something like this: "Warning: /usr/local/lib/pkgconfig isn't writable."
它会给你以下建议:你可能应该 chown/usr/local/lib/pkgconfig".
It will give you the advice that: "You should probably chown /usr/local/lib/pkgconfig".
这意味着:sudo chown -R $(whoami)/usr/local/lib/pkgconfig
然后你需要用这个链接文件:brew link yourLibrary
Then you will need to link the files with this: brew link yourLibrary
如果这不起作用,希望 brew doctor
的输出足以让您继续搜索.
If this does not work hopefully the output of brew doctor
will give you enough to continue the search.
这篇关于Brew 错误:无法符号链接,路径不可写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!