使用homebrew安装openResty,出现以下报错

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Error: Failed to download resource “openresty-openssl111–patch”
Download failed: https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-1.1.1f-sess_set_get_cb_yield.patch

安装OpenResty失败原因如下

错误代码如下,显示不能访问raw.githubusercontent.com。

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

原因如下:在访问raw.githubusercontent.com的时候,本地浏览器和系统都没有该网站的缓存。DNS解析该域名的过程如下
本地浏览器缓存 -> 系统浏览器缓存 -> hosts文件 -> DNS系统
通过以上报错得知:系统下载OpenResty需要从raw.githubusercontent.com获取资源。但是我们访问DNS系统的过程中是存在问题的。安装失败

解决方案

vi /etc/hosts
199.232.68.133   raw.githubusercontent.com
Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐