关于homebrew使用时遇到的问题: Error: Could not symlink bin/gdb/usr/local/bin is not writable.


这是我在给我的Mac电脑安装GDB的时候遇到的问题:

我的Mac使用homebrew管理,于是我使用brew install gdb命令直接安装gdb,结果如下:

我在stackoverflow找到了发生的类似情况,经过阅读判断,找到了一下两种解决办法:

  • 如图,直接输入命令:

命令内容:

sudo chown -R `whoami`:admin /usr/local/bin
  • 如图,为了谨慎起见,使用homebrew doctor进行检测,根据其反馈来进行操作:

我认为应该使用第二中方法比较好,于是我在终端输入homebrew doctor,稍作等待得到检测结果:

如划红线部分所示,与我遇到的问题相符合,运行其解决方案:

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

在此时再link一下我的GDB:

brew link gdb

结果如下:

Already linked: /usr/local/Cellar/gdb/8.0.1

再测试一下GDB:

gdb

结果如下:



成功.

那么问题的原因是什么呢?

  • 问题出现在我之前安装OpenSSL时使用了sudo make install命令,导致了一些软件非homebrew管理,所以homebrew在Link的时候会出现问题。
  • 参考homebrew doctor如下提示:
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
You should change the ownership and permissions of these directories.
back to your user account.

参考资料

用brew安装node遇到的问题

Error: The 'brew link' step did not complete successfully

homebrew could not symlink usr/local/bin is not writable

关于homebrew使用时遇到的问题: Error: Could not symlink bin/gdb/usr/local/bin is not writable.的更多相关文章

  1. Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)

    centos7.5 安装mysql数据库报错 问题: [root@db04-54 scripts]# /etc/init.d/mysqld start /etc/init.d/mysqld: line ...

  2. error: <class 'xml.parsers.expat.ExpatError'>, syntax error: line 1, column 0: file: /usr/local/lib/python2.7/xmlrpclib.py line: 557

    当linux设备上开启sonar6.2时, supervisorctl status报如下错误: error: <class 'xml.parsers.expat.ExpatError'> ...

  3. python pip 使用时错误: Patal error in launcher:Unable to create process using '"'

    当前我的电脑配置是64位, 装有python2.7 和python 3.6 两个版本 在使用pip install mysqlclient 的时候,出现了  Patal error in launch ...

  4. inotify+rsync文件实时同步报错:usr/local/bin/inotifywait: error while loading shared libraries: libinotifytools.so.0:

    解决办法: ln -sv /usr/local/lib/libinotify* /usr/lib/ /usr/lib64/libinotifytools.so.

  5. Mac上Homebrew的使用 (Homebrew 使 OS X 更完整)

    0 Homebrew是啥? “Homebrew installs the stuff you need that Apple didn’t.——Homebrew 使 OS X 更完整”. Homebr ...

  6. Mac上Homebrew的使用——Homebrew 使 OS X 更完整

    0 Homebrew是啥? “Homebrew installs the stuff you need that Apple didn’t.——Homebrew 使 OS X 更完整”. Homebr ...

  7. 安装HomeBrew 失败的解决方案(Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!)

    在安装HomeBrew(或者安装成功 执行相关指令)时遇到错误提示: Error: Failure while executing: git clone https://github.com/Home ...

  8. jenkins使用时出现的问题!

      从安装到日常使用中遇到过的问题和解决方法:   背景/问题:安装时是跳过安装插件过程的,安装好后,我发现里面啥也做不了,连个git的插件都无法下载. 方法:在jenkins的主界面,打开系统管理= ...

  9. Mac下Mysql启动异常["ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"]

    在mac下使用brew安装mysql,之前没有使用过,今天启动的时候发现启动不了 huijundeMacBook-Pro:bin huijunzhang$ mysql ERROR (HY000): C ...

随机推荐

  1. 41、Thead线程 System.Thread与互斥体Mutex

    Thead线程 System.Thread 使用Thread类可以创建和控制线程.下面的代码是创建和启动一个新线程的简单例子.Thread 类的构造函数重载为接受ThreadStart和Paramet ...

  2. C++计算器项目的初始部分

    作业代码 https://github.com/How-Come/object-oriented/tree/master/Calculator 一.解题思路 1.Scan类 这次题目的难点在于如何将输 ...

  3. [emerg]: getpwnam(“nginx”) failed

    [root@localhost nginx-1.11.2]# /usr/local/nginx/sbin/nginx nginx: [emerg] getpwnam("nginx" ...

  4. 让CI框架支持service层

    大家知道CodeIgniter框架式MVC分层的,通常大家把业务逻辑写到Controller中,而Model只负责和数据库打交道. 但是随着业务越来越复杂,controller越来越臃肿,举一个简单的 ...

  5. BZOJ4321:queue2(DP)

    Description n 个沙茶,被编号 1~n.排完队之后,每个沙茶希望,自己的相邻的两人只要无一个人的编号和自己的编号相差为 1(+1 或-1)就行.现在想知道,存在多少方案满足沙茶们如此不苛刻 ...

  6. 「bzoj 4025: 二分图」

    题目 显然二分图没有奇环 于是考虑使用并查集维护一下看看是否存在奇环 我们可以考虑加权并查集,维护出\(x\)到\(fa_x\)的实际距离 由于我们只需要考虑奇偶性,于是我们处理出到根的路径异或一下就 ...

  7. ZooKeeper学习之路 (四)ZooKeeper开发环境eclipse配置

    一.eclipse中配置zookeeper开发环境 1)将zookeeper eclipse plugin中的6个jar包放到eclipse安装目录下的plugins文件中,重启eclipse (2) ...

  8. ROS2 MAC OS Install

    ROS2 MAC OS Install(非原创),安装过程记录一下 注意: (1)如果安装了anaconda,请将~/.bash_profile文件中的export PATH="/anaco ...

  9. PAT——1046. 划拳

    划拳是古老中国酒文化的一个有趣的组成部分.酒桌上两人划拳的方法为:每人口中喊出一个数字,同时用手比划出一个数字.如果谁比划出的数字正好等于两人喊出的数字之和,谁就赢了,输家罚一杯酒.两人同赢或两人同输 ...

  10. 关于contentquery webpart的pdf文件如何在OOS上打开,并且所有文件在浏览器新起的页面打开?

    function SetHref(pdf) { var c = pdf.href; var d = "http://eds.jd.com"; var f = "" ...