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


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

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

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

  • 如图,直接输入命令:

命令内容:

  1. 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如下提示:
  1. This can happen if you "sudo make install" software that isn't managed
  2. by Homebrew. If a formula tries to write a file to this directory, the
  3. install will fail during the link step.
  4. You should change the ownership and permissions of these directories.
  5. 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. python30 excel修改模块xlutils

    xlrd只读,xlwt只写,xlutils模块则将读写功能结合起来.https://pypi.org/project/xlutils/ 修改excel通过xlutils的copy函数将<clas ...

  2. Linux系统之路——如何在服务器用U盘安装CentOS7.2(一)

    终于将CentOS7装上服务器(thinkserver250,不得不说联想的太烂了)了,过程无比艰辛,因为我发现网上大家提到的所有U盘安装CentOS7时碰到的问题几乎都被我碰到了,像什么: 1.刻录 ...

  3. vue项目出现的错误汇总

    报错一: expected "indent", got "!" 通过vue-cli创建的项目,不需要在webpack.base.conf.js中再手动配置关于c ...

  4. Mint-ui 中 Popup 作为组件引入,控制弹出框的显示与隐藏遇到的问题。

    Popup组件的结构: <template>   <div>   <!--分享弹出窗 begin-->     <mt-popup class="s ...

  5. java复制文件夹及所有子目录和文件

    package text; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; im ...

  6. webkit架构

    简要的说,WebKit由三个模块组成:JavaScriptCore.WebCore 和 WebKit.WebKit作为了整个项目的名称. JavaScriptCore:是JavaScript解释器: ...

  7. 3669. [NOI2014]魔法森林【LCT 或 SPFA动态加边】

    Description 为了得到书法大家的真传,小E同学下定决心去拜访住在魔法森林中的隐士.魔法森林可以被看成一个包含个N节点M条边的无向图,节点标号为1..N,边标号为1..M.初始时小E同学在号节 ...

  8. Sublime Text 3中文乱码问题解决

    Sublime Text 3是我MacBook Pro最喜欢的代码编辑器,没有之一,因为她的性感高亮代码配色,更因为它的小巧,但是它默认不支持GBK的编码格式,因此打开GBK的代码文件,如果里面有中文 ...

  9. topk两种解法

    1.这个通过partition实现topk,时间复杂度是o(logn*logn),也就是0(n),但需要修改原数组的顺序 下面这个代码本身有一些错误,并且throw excption会在牛客上报错 c ...

  10. CentOS7.2安装RabbitMQ笔记

    身为.NET程序员,用着宇宙级IDE,干什么事都变得越来越懒了,Windows操作系统在手,能通过桌面点点点的方式何必找其他罪受呢..于是RabbitMQ自然而然也就跑在Windows上了,说实话Wi ...