我们在打开https://brew.sh/index_zh-cn官网的时候都会给你下面这段代码,粘贴复制就可以安装;

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

问题1:

会经常报错:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

解决方法:

1.原因是这个“raw.githubusercontent.com”域名,被一堵墙拦下了;

2.只需要找到“raw.githubusercontent.com”这个域名的对应ip地址即可用;

  域名解析方法:1.百度智能云有域名解析,可以直接点击链接:https://cloud.baidu.com/product/bcd/search.html/#/dns

       2.打开终端:ping 域名

       3.打开终端:nslookup 回车 域名

  我解析道的有很多个ip:

  

3.打开“访达”按(command+shift+g)输入:/etc

  

  找到:hosts文件

  

  

  注意:这里直接更改hosts我们是没有权限的,可以直接复制一份,然后知啊复制的里面进行更改,在里面加入:

    185.199.108.133 raw.githubusercontent.com

  保存文件,然后吧文件名称再次改回hosts,然后回到etc文件夹直接拖动进去,这时候系统会提示是否替换,点击确认,输入密码;

4.再次打开终端,输入:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

5.正确结果

  

#mac安装Homebrew报错问题:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused的更多相关文章

  1. Linux下安装vim-plug报错:Failed to connect to raw.githubusercontent.com port 443: Connection refused

    安装vim-plug时,输入以下命令: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.c ...

  2. mac 安装mysql 报错“ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2)” 解决办法

    首先安装 homebrew 再 brew install mysql 之后连接 mysql 无论是登录还是修改初始密码都会报如下的错误 ERROR 2002 (HY000): Can not conn ...

  3. 解决mac安装homebrew后报错-bash: brew: command not found

    解决mac安装homebrew后报错-bash: brew: command not found     参照官网上很简单的一句安装命令, /usr/bin/ruby -e "$(curl ...

  4. Mac安装MySQL-python报错解决

    Mac安装MySQL-pyhton报错 今天在Mac上安装MySQL-python报错,搜遍网络都说什么mysql config路径问题,但是都不行. 解决方案 一开始遇到的问题是: Complete ...

  5. Mac安装MAT报错问题

    安装mat报错,提示在/.eclipse/1528649425_macosx_cocoa_x86_64/configuration/1539332382530.log路径下查看错误日志, 原因是/pr ...

  6. [原创] ubuntu下安装scrapy报错 error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    Ubuntu14.04在virtualenv下安装scrapy报错,Failed building wheel for cffi,lxml,cryptography 等. error: command ...

  7. 关于mac安装rails报错clang: error: unknown argument

    文章都是从我的个人博客上转载过来的,大家可以点击我的个人博客. www.iwangzheng.com mac上安装rails的时候报错, 安装rails的在终端执行了一句命令: $sudo gem i ...

  8. mac 安装homobrew 报错解决

    按照官网(https://brew.sh/index_zh-cn.html)给的命令:     /usr/bin/ruby -e "$(curl -fsSL https://raw.gith ...

  9. 【Django】Mac 安装pip3-install-mysqlclient 报错

    1.首先在pip3-install-mysqlclient时报错 mysql_config not found 2.逛了一些博客 让安装mysql或者mysql-connector-c 我安装了后者还 ...

  10. mac安装MySQL-Python报错

    报错内容主要是: EnvironmentError: mysql_config not found Command "python setup.py egg_info" faile ...

随机推荐

  1. Flutter 下载篇 - 叁 | 网络库切换实践与思考

    前言 本文是关于使用flutter_download_manager下载功能的实践和探索.我们将基于flutter_download_manager的功能扩展,改造成自己想要的样子.在阅读本文之前,建 ...

  2. Redis的自增也能实现滑动窗口限流?

    限流是大家开发之路上一定会遇到的需求.比如:限制一定时间内,接口请求请求频率:一定时间内用户发言.评论次数等等,类似于滑动窗口算法.这里分享一份拿来即用的代码,一起看看如何利用常见的 Redis 实现 ...

  3. 使用 diffusers 训练你自己的 ControlNet 🧨

    简介 ControlNet 这个神经网络模型使得用户可以通过施加额外条件,细粒度地控制扩散模型的生成过程.这一技术最初由 Adding Conditional Control to Text-to-I ...

  4. SQL concat_ws, collect_set, 和explode合并使用

    1. 背景 有一个这样的数据集:字段和字段的值是两列 目的是将这个数据转换成规整的一个特征是一列的数据: 2. 做法 第一步:先造出列 select ucid ,CASE WHEN type ='性别 ...

  5. v-if与v-show造成部分元素丢失的问题——v-if复用元素问题

    pre { overflow-y: auto; max-height: 400px } img { max-width: 500px; max-height: 300px } 问题描述 在写tab切换 ...

  6. 中国省市区--地区SQL表

    SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for rc_district -- ---- ...

  7. MySQL(五)配置文件、系统变量与MySQL架构

    1 配置文件的使用 my.cnf配置文件 /etc/my.cnf: [root@hadoop103 ~]# cat /etc/my.cnf # For advice on how to change ...

  8. 【Java Se】JDBC

    启停服务 net start mysql net stop mysql 登录 mysql -u -p 访问指定IP的mysql mysql -u root -P 3306 -h localhost - ...

  9. Fatal error: Uncaught SoapFault exception:解决办法

    SOAP-ERROR: Parsing WSDL: failed to load external entity Fatal error: Uncaught SoapFault exception: ...

  10. 【介绍】C++五种迭代器

    目录 1. 输入迭代器(Input Iterator): 2. 输出迭代器(Output Iterator): 3. 前向迭代器(Forward Iterator): 4. 双向迭代器(Bidirec ...