DEV Community

STYT-DEV
STYT-DEV

Posted on

33

Solving "error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)" During Homebrew Installation

Introduction

This guide is specifically designed for beginners who are facing the Homebrew installation error related to network issues, particularly the "error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)" message. Follow these steps to resolve this issue.

Step-by-Step Solutions

  1. Check Network Connection

    • Ensure your internet connection is stable. If unstable, take steps to stabilize your connection.
    • If using a VPN, try disconnecting it to see if access to GitHub improves.
  2. Change Git's HTTP Transport

    • To potentially bypass the issue, switch Git's HTTP transport to HTTP/1.1:
     git config --global http.version HTTP/1.1
    
  3. Extend Git Timeout Settings

    • Increase timeout settings to accommodate slower connections:
     git config --global http.postBuffer 524288000
     git config --global http.lowSpeedLimit 0
     git config --global http.lowSpeedTime 999999
    
  4. Retry Installing Homebrew

    • Run the Homebrew installation script again:
     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    

Resetting Changes

If you need to revert the changes made to Git settings, use the following commands to return to default behaviors:

git config --global --unset http.version
git config --global --unset http.postBuffer
git config --global --unset http.lowSpeedLimit
git config --global --unset http.lowSpeedTime
Enter fullscreen mode Exit fullscreen mode

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (3)

Collapse
 
rf14 profile image
Arif Zuhairi

turning off my VPN works it out for me

Collapse
 
brinthan profile image
Brinthan

Thanks a lot, Working fine.

Collapse
 
aaron_chu profile image
Aaron Chu

Excellent, Bro!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay