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 ...
随机推荐
- 分享jQuery封装好的一些常用操作
1. 禁止右键点击 $(document).ready(function(){ $(document).bind("contextmenu",function(e){ ...
- Unity 移动端的复制这么写
游戏上线很久了,有些玩家慢慢就流失了,为了让刚流失的玩家再度回归所以做了召回功能!如果一个200级的玩家10天没上线且成功召回的,就会给予召回玩家丰厚的奖励! Q:那如何召回这个流失的玩家呢? A:召 ...
- html 页面模块的常用命名
头:header 内容:content/container 尾:footer 导航:nav 侧栏:sidebar 栏目: ...
- 电脑开机提示 NTLDR is missing
电脑开机,黑屏并提示NTLDR is missing Press Ctrl+Alt+Del to restart,并且反复重启都不行,这是怎么回事呢?首先我们来分析下这段英语的含义:NTLDR是指NT ...
- 我学cocos2d-x (三) Node:一切可视化对象的祖先
在cocos2d-x中一切可视化的对象都继承自Node(如文字(label).精灵(sprite).场景(scene).布局(layer)).这是一个纯虚类.主要负责决定元素显示的位置. 由导演(Di ...
- Python Scrapy初步使用
1.创建爬虫工程 scrapy startproject stockproject001 2.创建爬虫项目 cd stockproject001 scrapy genspider stockinfo ...
- Anfroid 在界面中显示图片 ImageView
ImageView1.什么是ImageView是显示图片的一个控件2.ImageView属性android:src ImageView的内容颜色 android:background ImageVie ...
- 【死磕jeestie源码】类型后面三个点(String...)和数组(String[])的区别
类型后面三个点(String...),是从Java 5开始,Java语言对方法参数支持一种新写法,叫可变长度参数列表,其语法就是类型后跟...,表示此处接受的参数为0到多个Object类型的对象,或者 ...
- c++ 重载、重写、重定义(隐藏)
1.重载overload:函数名相同,参数列表不同. 重载只是在类的内部存在,或者同为全局范围.(同名,同参函数返回值不同时,会编译出错.因为系统无法知晓你到底要调用哪一个.) 2.重写overr ...
- salt更换新key
1 停止salt-minion服务 service salt-minion stop 2 删除salt-minion公钥文件 rm /etc/salt/pki/minion/minion.pub r ...