关于homebrew使用时遇到的问题: Error: Could not symlink bin/gdb/usr/local/bin is not writable.
关于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.的更多相关文章
- 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 ...
- 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'> ...
- python pip 使用时错误: Patal error in launcher:Unable to create process using '"'
当前我的电脑配置是64位, 装有python2.7 和python 3.6 两个版本 在使用pip install mysqlclient 的时候,出现了 Patal error in launch ...
- 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.
- Mac上Homebrew的使用 (Homebrew 使 OS X 更完整)
0 Homebrew是啥? “Homebrew installs the stuff you need that Apple didn’t.——Homebrew 使 OS X 更完整”. Homebr ...
- Mac上Homebrew的使用——Homebrew 使 OS X 更完整
0 Homebrew是啥? “Homebrew installs the stuff you need that Apple didn’t.——Homebrew 使 OS X 更完整”. Homebr ...
- 安装HomeBrew 失败的解决方案(Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!)
在安装HomeBrew(或者安装成功 执行相关指令)时遇到错误提示: Error: Failure while executing: git clone https://github.com/Home ...
- jenkins使用时出现的问题!
从安装到日常使用中遇到过的问题和解决方法: 背景/问题:安装时是跳过安装插件过程的,安装好后,我发现里面啥也做不了,连个git的插件都无法下载. 方法:在jenkins的主界面,打开系统管理= ...
- 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 ...
随机推荐
- [TJOI2013]攻击装置
题目 癌我竟然会做 发现我们要求的是一个最大独立集问题 发现一个格子和能攻击到的格子的奇偶性和它都不同,于是我们就可以按照\(i+j\)的奇偶性把整张图分成两个部分 两个部分之间没有连边 于是二分图最 ...
- shell一次性执行多条命令
1.每个命令之间用;隔开说明:各命令的执行给果,不会影响其它命令的执行.换句话说,各个命令都会执行,但不保证每个命令都执行成功. 2.每个命令之间用&&隔开说明:若前面的命令执行成功, ...
- Tomcat 安装APR的有关问题
Tomcat 安装APR的问题APR.APR-util.APR-iconv安装都正常apr安装命令:./configuremakemake install apr-util./configure -- ...
- HDU 1213(裸并查集)(无变形)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1213 How Many Tables Time Limit: 2000/1000 MS (Java/ ...
- unordered_map 遇到 vector subscript out of range 的错误提示
错误类型 当调用unordered_map的函数的时候,会出现如下问题: 使用linux运行则会提示 float exeption(core dump) 原因 遇到vector subscript o ...
- 使用Docker遇到的基本命令及问题小结
当遇到Cannot connect to the Docker daemon. Is the docker daemon running on this host?导致Docker无法启动时,重启Do ...
- Oracle 使用RMAN进行备份
备份理论和基本语法 备份概念 执行备份或还原草的数据库称为目标.在一些环境下,有许多数据库,因此有许多RMAN目标.应一次连接每个数据库.目标的每个备份都有一些属性: 打开或关闭 完整或部分 完整或增 ...
- python3爬虫-爬取B站排行榜信息
import requests, re, time, os category_dic = { "all": "全站榜", "origin": ...
- js节点操作实例
写了一个简单的小例子来引用js实例 1. 初步节点操作: 2.兼容性节点操作: 3.节点的类型,名字: 4.使用setAttribute设置属性 5.节点复制操作: 6.删除和替换节点 如有错误,还望 ...
- 基于CLGeocoder - 反地理编码
iOS中CoreLocatio框架中的CLGeocoder 类不但为我们提供了地理编码方法,而且还提供了反地理编码: 同样需要导入框架: #import <CoreLocation/CoreLo ...