mac 安装homobrew 报错解决
按照官网(https://brew.sh/index_zh-cn.html)给的命令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
执行后 报错:
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'
Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
从报错来看,是说 /Library/Developer/CommandLineTools 不是 xcode-select 的有效路径
那么要做的就有两件事:
1.找到 xcode-select的有效路径
2.使用有效路径替换 https://raw.githubusercontent.com/Homebrew/install/master/install 文件中的 /Library/Developer/CommandLineTools
1.查找 xcode-select的有效路径
使用命令:xcode-select 查看其用法
userNameMacBook-Pro:test userName$ xcode-select
xcode-select: error: no command option given
Usage: xcode-select [options]
Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).
Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
执行:xcode-select -p找到真正的路径,输出
/Applications/Xcode.app/Contents/Developer 即 xcode-select的有效路径
2.使用有效路径:/Applications/Xcode.app/Contents/Developer
替换 https://raw.githubusercontent.com/Homebrew/install/master/install 文件中的 /Library/Developer/CommandLineTools
将https://raw.githubusercontent.com/Homebrew/install/master/install 内容复制下来,将第306和315行两处的/Library/Developer/CommandLineTools
改为/Applications/Xcode.app/Contents/Developer 并保存名为 install的文件
3.进入保存的install文件目录下,执行
ruby -e "$(cat install)"即可
mac 安装homobrew 报错解决的更多相关文章
- Mac安装MySQL-python报错解决
Mac安装MySQL-pyhton报错 今天在Mac上安装MySQL-python报错,搜遍网络都说什么mysql config路径问题,但是都不行. 解决方案 一开始遇到的问题是: Complete ...
- python︱模块加载(pip安装)以及pycharm安装与报错解决方式
每每以为攀得众山小,可.每每又切实来到起点,大牛们,缓缓脚步来俺笔记葩分享一下吧,please~ --------------------------- 准备放下R开始学python,真是痛苦,因为找 ...
- 安装APK报错解决方法【转】
本文转载自:http://blog.csdn.net/zy1235678/article/details/38122827 adb install xxx.apk 报错,安装APK报错:INSTALL ...
- python 2.7安装pygame报错解决办法pygame-1.9.4-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
python下载python安装包 https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame 下载完后进入cmd命令行执行安装,报错: pygame-1.9 ...
- Mac安装MAT报错问题
安装mat报错,提示在/.eclipse/1528649425_macosx_cocoa_x86_64/configuration/1539332382530.log路径下查看错误日志, 原因是/pr ...
- darknet的安装及报错解决
darknet 是YOLO网络的一个框架,安装见官网:https://pjreddie.com/darknet/ 跟着步骤就可以安装好了. 由于官网是全英文的,所以本文根据官网进行中文释义. 本人在按 ...
- 【Django】Mac 安装pip3-install-mysqlclient 报错
1.首先在pip3-install-mysqlclient时报错 mysql_config not found 2.逛了一些博客 让安装mysql或者mysql-connector-c 我安装了后者还 ...
- hp安装oracle报错解决
hpux上安装oracle 11gR2刚开始报错:集群验证框架内部发生了错误 解决办法http://www.it165.net/database/html/201509/14181.html 将文件后 ...
- ubuntu pip 安装django报错解决
系统版本 ubuntu Kylin 16.04 LTS 安装pip3 安装 Django 总是提示time out,无法安装. 逛了好多论坛终于遭到了解决办法,分享保存: sudo pi ...
随机推荐
- BleedTree动画混合树
通过Unity动画状态机,能帮我们轻松处理转换各个动画片断,达到想要的效果,但是如果仅仅是一个个动画的硬生生的切换,那么看起来就非常突然,而不真实了,在质量要求比较高的游戏中,特别是动作游戏,我们就不 ...
- js继承摘要
对象的构造函数是指向创建对象的类的原型对象的构造函数. 类是一个Function, Function都有原型对象,原型对象的构造函数指向类的声明. function Person(){ } Perso ...
- 超全面的JavaWeb笔记day05<xml&dtd&jaxp>
0.表单提交方式(*****) button提交 超链接提交 事件 1.xml简介和应用(了解) 2.xml文档声明和乱码解决(*****) 文档声明 必须放在第一行第一列 设置xml编码和保存编码一 ...
- ios开发之--ios11适配:TableView的heightForHeaderInSection设置高度无效/UISearchBar消失
更新到ios11,然后使用x-code9运行项目,发现tableview的-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInS ...
- 关于直播学习笔记-004-nginx-rtmp、srs、vlc、obs
1.采集端:OBS RTMP推流地址:rtmp://192.168.198.21:1935/live 流密钥:livestream(任意-但播放地址与此一致) 2.播放端:nginx-rtmp-win ...
- RF常用快捷键
转自:http://www.robotframework.net/article/47 重命名——>F2 搜索关键字——>F5 执行用例——>F8 创建新工程——>ctrl+n ...
- Python 文件类型
Python的文件类型分为以下几种: 1. 源代码文件,也就是以 .py 为扩展名的文件,由 python 程序解释,不需要编译 2. 字节代码文件,python 源代码文件经过编译后生成的扩展名为 ...
- Qt5的cmake文件位置
D:\APICenter\Qt\Qt5.8.0\5.8\msvc2015\lib\cmake\Qt5\Qt5Config.cmake
- VS2013快捷键
这个好用,先放这两个 组合键“Ctrl+Enter”:在当前行的上面插入一个空行: 组合键“Ctrl+Shift+Enter”:在当前行的下面插入一个空行.
- jQuery的无new构建
正常面向对象的写法: var cJquery = function(){ //构造函数体 }; cJquery.prototype = { name : function(alert("ch ...