Mac OS Installation Error

Hello All,

I am facing the issue below while trying to install the Homebrew. Any advise is most welcome.

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew…
remote: Enumerating objects: 74, done.
remote: Counting objects: 100% (74/74), done.
remote: Compressing objects: 100% (53/53), done.

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

Many thanks
Alexandre

It seems your Internet connection is 't stable. Unfortunately that’s not something I can help you with.

Thanks for your reply. It’s worked after making some changes to my Mac (restore user permissions) and rerun the uninstall command.

Hi Alexandre,

I’m having similar issues installing on Mojave 10.14.6 and want to try your steps you took to fix the problem. Can you give more details - how to restore user permissions and what uninstall command you ran?

I have tried incrementing buffer size as recommended in this thread:


and as mentioned in other threads seeking solutions to similar errors I have no antivirus, VPN or Firewall software running. I have also tried the process via a different network.

I’m not sure if I should copy and paste my bash session transcript here too since this is an old thread and marked solved? I’ll remove it and start a new thread if requested, so here goes:

/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”

==> This script will install:

/usr/local/bin/brew

/usr/local/share/doc/homebrew

/usr/local/share/man/man1/brew.1

/usr/local/share/zsh/site-functions/_brew

/usr/local/etc/bash_completion.d/brew

/usr/local/Homebrew

Press RETURN to continue or any other key to abort

==> Downloading and installing Homebrew…

HEAD is now at f527f03fb Merge pull request #7178 from Homebrew/dependabot/bundler/Library/Homebrew/parallel_tests-2.32.0

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

fatal: the remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!

Failed during: /usr/local/bin/brew update --force

==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.

Read the analytics documentation (and how to opt-out) here:

https://docs.brew.sh/Analytics

No analytics data has been sent yet (or will be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:

==> Next steps:

  • Run brew help to get started

  • Further documentation:

I tried again a few days later and the install seemed to progress further…

Quentins-MacBook-Pro-15:~ quentin$ ==> This script will install:

/usr/local/bin/brew

/usr/local/share/doc/homebrew

/usr/local/share/man/man1/brew.1

/usr/local/share/zsh/site-functions/_brew

/usr/local/etc/bash_completion.d/brew

/usr/local/Homebrew

Press RETURN to continue or any other key to abort

==> Downloading and installing Homebrew…

remote: Enumerating objects: 21, done.

remote: Counting objects: 100% (21/21), done.

remote: Compressing objects: 100% (13/13), done.

remote: Total 21 (delta 10), reused 10 (delta 8), pack-reused 0

Unpacking objects: 100% (21/21), done.

From https://github.com/Homebrew/brew

  • [new branch] dependabot/bundler/Library/Homebrew/activesupport-6.0.2.2 -> origin/dependabot/bundler/Library/Homebrew/activesupport-6.0.2.2

  • [new branch] dependabot/bundler/docs/activesupport-6.0.2.2 -> origin/dependabot/bundler/docs/activesupport-6.0.2.2

f527f03fb…5518f276e master -> origin/master

HEAD is now at 5518f276e Merge pull request #7187 from vidusheeamoli/fix-broken-link-test-bot

error: RPC failed; curl 18 transfer closed with outstanding read data remaining

fatal: the remote end hung up unexpectedly

fatal: protocol error: bad pack header

Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!

Failed during: /usr/local/bin/brew update --force

==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.

Read the analytics documentation (and how to opt-out) here:

https://docs.brew.sh/Analytics

No analytics data has been sent yet (or will be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:

==> Next steps:

  • Run brew help to get started

  • Further documentation:

-c: line 585: syntax error: unexpected end of file

Weird that despite the file fetch failure it says install complete. I can also run homebrew installs but there is the odd error and bug. For example:

==> Downloading https://homebrew.bintray.com/bottles/zlib-1.2.11.high_sierra.bottle.tar.gz

######################################################################## 100.0%

==> Pouring zlib-1.2.11.high_sierra.bottle.tar.gz

Error: undefined method `strip’ for :provided_by_osx:Symbol

Please report this bug:

/usr/local/Homebrew/Library/Homebrew/formula_support.rb:40:in `to_s’

/usr/local/Homebrew/Library/Homebrew/caveats.rb:43:in `keg_only_text’

/usr/local/Homebrew/Library/Homebrew/caveats.rb:24:in `caveats’

/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/forwardable.rb:224:in `empty?’

/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:622:in `caveats’

/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:671:in `finish’

/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:330:in `install_formula’

/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:261:in `block in install’

/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:259:in `each’

/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:259:in `install’

/usr/local/Homebrew/Library/Homebrew/brew.rb:103:in `’

This all rather worrying, and on top of the notes provided during installs about using this and that and setting export flags etc. etc. I’m beginning to think this is such an uphill battle to just get started it might not be worth it just as a newbie hoping to learn to write and run a few scripts to automate some software on my machine.

I’m actually installing Homebrew as a recommended step for doing a Python 3 install on OSX that can be maintained well and doesn’t interfere with the OS native Python 2.7 functioning. I’m following this guide:

Since Python has a GUI installer for OSX I’m not even sure if I need to follow this guide and install home-brew at all. It may be that the Python installer package takes care of everything and won’t interfere with the native OS Python functions. If anyone has any info on this it might save me wasting time troubleshooting this issue. It’s not really the best place to ask this question but I thought I’d mention it in case, on the off chance, someone here is in the know.

Something is weird with your internet connection. It seems your homebrew install is incomplete but I don’t know if running the installer again will fix it. If you just need python I’d go for the package in this case.

Thanks, I’ll try that. I’m thinking it would be sensible to uninstall all the stuff I installed so far including homebrew in case it is incomplete and breaks anything