本文翻译自:Homebrew: Could not symlink, /usr/local/bin is not writable [closed]

While installing tig , HomeBrew is displaying the following issues while installing a dependency: 在安装tigHomeBrew显示的是以下问题,而安装的依赖:

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

#1楼

参考:https://stackoom.com/question/1noCy/Homebrew-无法符号链接-usr-local-bin不可写-关闭


#2楼

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. 这似乎是一个非特定于正在安装的软件包但具有homebrew文件夹权限的问题。

sudo chown -R `whoami`:admin /usr/local/bin

For some packages, you may also need to do this to /usr/local/share or /usr/local/opt : 对于某些软件包,您可能还需要对/usr/local/share/usr/local/opt

sudo chown -R `whoami`:admin /usr/local/share
sudo chown -R `whoami`:admin /usr/local/opt

#3楼

Rather than running any particular command, I would recommend running brew doctor and taking all warnings seriously. 我不建议运行任何特定命令,而是建议运行brew doctor并认真对待所有警告。 There may be other problems you get stuck at which may not be captured in this question. 您可能会遇到其他问题,可能无法在此问题中捕获这些问题。

Also, as brew gets updated with time, particular commands may or may not remain valid. 此外,随着brew随时间更新,特定命令可能保持有效,也可能不保持有效。 brew doctor , however, will ensure that you get up to date troubleshooting. 但是, brew doctor会确保您获得最新的故障排除。


#4楼

If you go to the folder in finder, right click and select "Get Info" you can go to the "Sharing and Permissions" section for the folder and allow "Read & Write" to "everyone" 如果您在finder中转到该文件夹​​,右键单击并选择“获取信息”,您可以转到该文件夹​​的“共享和权限”部分,并允许“读取和写入”到“所有人”

This is what I do to make symlinks pass with this error. 这就是我用symlinks传递此错误的方法。 Also brew seems to reset the permissions on the folder also as if you hadn't altered anything brew也似乎重置了文件夹的权限,就好像你没有改变任何东西


#5楼

I've found the following relevant for Sophos Anti-Virus users: 我发现以下与Sophos Anti-Virus用户有关:

https://stackoverflow.com/a/32981184 https://stackoverflow.com/a/32981184

https://community.sophos.com/products/free-antivirus-tools-for-desktops/f/17/t/10029 https://community.sophos.com/products/free-antivirus-tools-for-desktops/f/17/t/10029

In short, Sophos is changing permissions of certain /usr/local directories. 简而言之,Sophos正在更改某些/ usr / local目录的权限。 Sophos has patched this and the fix is included with version 9.4.1. Sophos修补了此版本,修补程序包含在9.4.1版本中。


#6楼

I found for my particular setup the following commands worked 我发现在我的特定设置中,以下命令有效

brew doctor

And then that showed me where my errors were, and then this slightly different command from the comment above. 然后,这向我展示了我的错误,然后这与上面的评论略有不同。

sudo chown -R $(whoami) /usr/local/opt

Homebrew:无法符号链接,/ usr / local / bin不可写[关闭]相关推荐

  1. 编译makefile失败,提示autom4te: need GNU m4 1.4 or later: /usr/local/bin/m4

    最近macOS升级到了最新10.13.结果原来的打包脚本就运行失败了,只要make -f 就报错 autom4te: need GNU m4 1.4 or later: /usr/local/bin/ ...

  2. mac下Homebrew安装Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed报错解决方法

    在安装 Homebrew 时发现了如下报错 Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed ...

  3. 安装brew提示/usr/local/bin is not in your PATH.

    安装brew提示/usr/local/bin is not in your PATH 或者安装node后提示node: command not found 解决方法:修改环境变量配置文件 在Linux ...

  4. 【转载】ubuntu下/usr/bin和/usr/local/bin的区别

    这篇文章已经无法考证是谁原创的了 首先注意usr 指 Unix System Resource,而不是User 然后通常: /usr/bin下面的都是系统预装的可执行程序,会随着系统升级而改变. /u ...

  5. linux里根目录下的/bin,usr里的/usr/bin还有local里的/usr/local/bin有什么区别?

    如图: 区别: usr不是user的缩写,而是unix system resource(unix系统资源目录)的 缩写, /bin 是所有用户都可以访问并执行的可执行程序.包括超级用户及一般用户. / ...

  6. linux卸载python3.6,当python3.6位于/usr/local/bin/python3.6时,如何在ubuntu上卸载它

    所以我默认的python3版本是3.7.5which python3 /usr/bin/python3 现在我的python3.6安装在:which python3.6 /usr/local/bin/ ...

  7. Linux /usr/bin与/usr/local/bin区别

    Linux /usr/bin与/usr/local/bin区别: 首先注意usr 指 Unix System Resource,而不是User 然后通常: /usr/bin下面的都是系统预装的可执行程 ...

  8. mac 无法ssh localhost,错误提示:bash: /usr/local/bin/ssh_session: Permission denied

    在网上找了很久也没有找到解决方案,最后根据提示自己摸索如下: 1.编辑/etc/sshd_config文件,注释掉 #ForceCommand /usr/local/bin/ssh_session 2 ...

  9. linux之/usr/local/bin和/usr/bin区别

    1.问题 我们一般习惯把**.py文件放到/usr/local/bin这个目录下面去,然后可以在linux系统里面任意一个目录执行这个python文件,然后和/usr/bin/这个目录一般有啥区别? ...

最新文章

  1. OKR案例分析,哪种类型的企业适合OKR?
  2. 【c++】25.事件驱动的详解
  3. 获取表单内部元素的N种方法
  4. 各版本Sql Server下载地址全
  5. 2020年Java面试100题
  6. 天网防火墙技术白皮书
  7. qq飞车手游服务器维护中,QQ飞车手游3月28日停机维护到几点_QQ飞车手游3.28停机维护时间_玩游戏网...
  8. IDC运维工程师的基本要求
  9. H: Yet Another Crosses Problem
  10. 高级计量经济学及stata应用 学习笔记③ 长面板
  11. 1期精彩推荐:如何应对工作中的冲突?
  12. 免费的艺术二维码生成器
  13. win11专业版降为家庭版
  14. ai直线怎么变折线_用Illustrator制作简单的折线图
  15. 【建议收藏】一份网络安全面试宝典请查收!!
  16. 软件 互操作性测试,软件兼容性测试与互操作性测试辩析
  17. 技术科普丨平台效果调试篇3-AWB Gain Adjust
  18. [附源码]计算机毕业设计基于springBoot仓库管理系统
  19. .split('?')
  20. 银河麒麟Kylin_s10_sp2安装Oracle11g(FS)(亲测有效)

热门文章

  1. java获取当前日期和时间的二种方法分享
  2. [转]C++异常处理 12
  3. 2008年全国计算机等级考试须知及参考资料
  4. WebBrowser页面与WinForm交互技巧(转)
  5. django中的media
  6. 机器学习项目实战----信用卡欺诈检测(二)
  7. 子元素margin-top为何会影响父元素?
  8. 【u009】瑞瑞的木板
  9. vue2.0+echarts可视化图形开发中遇到的问题总结
  10. 28 个必备的 Linux 命令行工具