50

I can't run brew upgrade without it hanging indefinitely. I'm using El Capitan OS. Here's the input/output:

>>$ brew upgrade
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, homebrew/science).
==> Updated Formulae
artifactory         dovecot             node@4              scamper
chromedriver        node-build          openvpn
==> Deleted Formulae
pdksh

==> Upgrading 10 outdated packages, with result:
gcc 6.2.0, gdbm 1.12, libtiff 4.0.7, openssl 1.0.2j, pkg-config 0.29.1_2, python 2.7.12_2, homebrew/science/r 3.3.2, readline 7.0.1, sqlite 3.15.2, yara 3.5.0_1
==> Upgrading gcc
Warning: Building gcc from source:
  The bottle needs the Xcode CLT to be installed.
==> Using the sandbox
==> Downloading https://ftpmirror.gnu.org/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2
Already downloaded: /Users/r8t/Library/Caches/Homebrew/gcc-6.2.0.tar.bz2
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/e9e0e
Already downloaded: /Users/r8t/Library/Caches/Homebrew/gcc--patch-863957f90a934ee8f89707980473769cff47ca0663c3906992da6afb242fb220.patch
==> Patching
==> Applying 6.1.0-jit.patch
patching file gcc/jit/Make-lang.in
==> ../configure --build=x86_64-apple-darwin15.6.0 --prefix=/usr/local/Cellar/gc
==> make bootstrap

And then nothing.

4
  • 1
    Have you tried to install xcode CLT?
    – MageeWorld
    Dec 8, 2016 at 1:45
  • Ha, I just started it running before you wrote that :P Dec 8, 2016 at 2:00
  • is this the first time you are installing home brew on your machine?
    – Erica
    Dec 8, 2016 at 2:00
  • No, I've had it forever, but likely the first upgrade or update since El Capitan. Dec 8, 2016 at 2:04

4 Answers 4

89

It could be downloading something large and taking a long time. Try running the following so you can see the download progress:

brew update --debug --verbose
6
  • After doing that I got this: Another active Homebrew update process is already in progress.Please wait for it to finish or terminate it to continue. How do you know when "Another" is done? Sep 14, 2018 at 14:43
  • 23
    brew update --verbose might be enough as --debug is quite confusing (e.g. verbose made it easy to see I had too many taps and it was blocking on one) May 11, 2019 at 13:20
  • 6
    This was helpful as I was able to see it was actually doing something.
    – aubreypwd
    Oct 9, 2020 at 12:57
  • 5
    brew update-reset fixed it for me — it is very slow though, patience is necessary.
    – Nate Levin
    Nov 8, 2022 at 22:59
  • 1
    After running brew update --verbose I was able to see that the process was still running correctly. However, my mac would always go to sleep. Running keepingyouawake.app fixed this for me (also available via brew).
    – killakalle
    Nov 16, 2023 at 14:04
73
  • ctrl + c to exit the hanging upgrade.
  • Run brew doctor. It prompted me to
  • run brew cleanup to clean up false symlinks. Then I
  • ran brew doctor again and it prompted me
  • to install xcode CLT via the command sudo xcode-select --install.
  • Finally brew update worked.
4
  • 2
    The xcode-select --install fixed the hanging GCC make for me. Thanks!
    – kontur
    Jan 19, 2018 at 16:05
  • 1
    All I did was brew doctor then brew prune. Not sure why that solved it. I'm on High Sierra 10.13.2
    – Geoff Lee
    Jan 25, 2018 at 0:30
  • 4
    Ctrl+c did not exit the hang Sep 14, 2018 at 14:42
  • 4
    brew prune has been replaced with brew cleanup
    – blu
    Apr 19, 2019 at 0:17
27

Verbose mode does work for me:

brew update --verbose
3

To add to the answer of @travelingbones, installation of gcc gets stuck when you do perform brew upgrade. You can further verify it by running this command

Verification of problem

brew install gcc

Instead of this, Doing following, speeds up the process, as brew installs precompiled version of gcc after x-code installation

Do this instead

sudo xcode-select --install
brew install gcc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.