自制程序:无法符号链接,/usr/local/bin不可写
问题描述:
在安装tig
时,HomeBrew
在安装依赖项时显示以下问题:
While installing tig
, HomeBrew
is displaying the following issues while installing a dependency:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/a2x
/usr/local/bin is not writable.
You can try again using:
brew link asciidoc
答
遵循 Alex的答案我能够解决此问题问题;似乎这不是特定于要安装的软件包的问题,而是homebrew
文件夹的权限.
Following Alex's answer I was able to resolve this issue; seems this to be an issue non specific to the packages being installed but of the permissions of homebrew
folders.
sudo chown -R `whoami`:admin /usr/local/bin
对于某些软件包,您可能还需要对/usr/local/share
或/usr/local/opt
执行此操作:
For some packages, you may also need to do this to /usr/local/share
or /usr/local/opt
:
sudo chown -R `whoami`:admin /usr/local/share
sudo chown -R `whoami`:admin /usr/local/opt