---
title: "mac 安装homebrew"
author: "vinnie424"
date: "2020-11-10T17:15:50Z"
tags: []
categories: ["非技术"]
slug: "mac-homebrew"
draft: false
lastmod: "2020-11-10T17:15:50Z"
id: 2517573
url: "https://vinnie424.iteye.com/blog/2517573"
---

转
官网：https://brew.sh/index_zh-cn
安装命令：
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
安装错误：curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
原因：由于某些你懂的因素，导致GitHub的raw.githubusercontent.com域名解析被污染了。
解决办法：通过修改hosts解决此问题。

查询真实IP：
在https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。
修改hosts：
sudo vim /etc/hosts
添加如下内容：
199.232.68.133 raw.githubusercontent.com