0

I am trying to install the Homebrew package on my system but whenever I try to run the below command to install homebrew I am getting the above-mentioned error
Command to install homebrew:

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


How can I solve this error? I am using Ubuntu 22.04.2 LTS OS
OS Type: 64 bit

Artur Meinild
  • 26,018
  • You should first check whether your server can connect to github or not, check the output using this: curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh – lemoana Mar 05 '23 at 04:57
  • No I cannot connect my server to github I checked it by running ping github.com command how can I fix it? – Coder_7 Mar 05 '23 at 05:34
  • This belongs to network problem and can have many aspects. You can troubleshoot this by checking these points: 1. DNS issues. 2. firewall or proxy issues. 3. HTTP proxy configuration issues. 4. GitHub accessibility issues. 5. you can try using a site that supports accelerated GitHub downloads, such as GitClone. you can get refer from here-cannot ping GitHub. – lemoana Mar 05 '23 at 06:52

2 Answers2

0

I read some stack exchange question which were related to my question to resolve this issue I found a hack to use VPN . In ubuntu snap store you can use Riseup VPN to solve this issue. In this scenario, router seems to be doing a transparent proxy.

If it is, then you may want to turn that off.

If you can't turn it off, then you might want to install a VPN solution that will allow you to bypass it.

You can go through this stackExchange question for more:

0

Adding --resolve raw.githubusercontent.com:443:185.199.108.133 after curl will solve the issue.

For example:

In the above case instead of

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

do

./bin/bash -c "$(curl --resolve raw.githubusercontent.com:443:185.199.108.133 -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
zx485
  • 2,426
Abhith
  • 1
  • 1