brew: brew install download VERY slow, pauses for 10 minutes for seemingly no reason
My brew is updated.
brew doctor results: Your system is ready to brew.
brew config:
HOMEBREW_VERSION: 1.7.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: d6a245c05110c240e680da594c2cc6038998b82e
Last commit: 8 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: d1ae0a1e2f3294f0472410e3d3f1e4306971839e
Core tap last commit: 23 minutes ago
HOMEBREW_PREFIX: /usr/local
CPU: dodeca-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.15.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.6-x86_64
CLT: 9.4.1.0.1.1528165917
Xcode: N/A
XQuartz: N/A
So the problem I am having is that whenever I brew install any formula, the Download portion gets stuck for about 10 minutes before initiating the curl command. See below for verbose debug log with time.
Just to reiterate it is the ==> Downloading portion where it gets stuck. The verbose debug message doesn’t seem to show any errors, and I’ve tried the curl command on its own and it works fast. No idea what is happening during the ==> Downloading output.
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.high_sierra.bottle.tar.gz
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.1 (Macintosh; Intel Mac OS X 10.13.6) curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/huanji/Library/Caches/Homebrew/gmp-6.1.2_2.high_sierra.bottle.tar.gz.incomplete https://homebrew.bintray.com/bottles/gmp-6.1.2_2.high_sierra.bottle.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1005k 100 1005k 0 0 1595k 0 --:--:-- --:--:-- --:--:-- 1595k
==> Verifying gmp-6.1.2_2.high_sierra.bottle.tar.gz checksum
==> Pouring gmp-6.1.2_2.high_sierra.bottle.tar.gz
tar xf /Users/huanji/Library/Caches/Homebrew/gmp-6.1.2_2.high_sierra.bottle.tar.gz -C /var/folders/gx/9ym9tnr11bqfcp81_fb7b4m80000gp/T/d20180731-87643-aas88u
Changing dylib ID of /usr/local/Cellar/gmp/6.1.2_2/lib/libgmp.10.dylib
from @@HOMEBREW_PREFIX@@/opt/gmp/lib/libgmp.10.dylib
to /usr/local/opt/gmp/lib/libgmp.10.dylib
Changing dylib ID of /usr/local/Cellar/gmp/6.1.2_2/lib/libgmpxx.4.dylib
from @@HOMEBREW_PREFIX@@/opt/gmp/lib/libgmpxx.4.dylib
to /usr/local/opt/gmp/lib/libgmpxx.4.dylib
Changing install name in /usr/local/Cellar/gmp/6.1.2_2/lib/libgmpxx.4.dylib
from @@HOMEBREW_CELLAR@@/gmp/6.1.2_2/lib/libgmp.10.dylib
to /usr/local/Cellar/gmp/6.1.2_2/lib/libgmp.10.dylib
==> Finishing up
ln -s ../Cellar/gmp/6.1.2_2/include/gmp.h gmp.h
ln -s ../Cellar/gmp/6.1.2_2/include/gmpxx.h gmpxx.h
ln -s ../../Cellar/gmp/6.1.2_2/share/info/gmp.info gmp.info
info /usr/local/share/info/gmp.info
ln -s ../../Cellar/gmp/6.1.2_2/share/info/gmp.info-1 gmp.info-1
ln -s ../../Cellar/gmp/6.1.2_2/share/info/gmp.info-2 gmp.info-2
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmp.10.dylib libgmp.10.dylib
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmp.a libgmp.a
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmp.dylib libgmp.dylib
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmpxx.4.dylib libgmpxx.4.dylib
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmpxx.a libgmpxx.a
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmpxx.dylib libgmpxx.dylib
/usr/bin/sandbox-exec -f /private/tmp/homebrew20180731-88713-1qaf2pp.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib:/Library/Ruby/Site/2.3.0:/Library/Ruby/Site/2.3.0/x86_64-darwin17:/Library/Ruby/Site/2.3.0/universal-darwin17:/Library/Ruby/Site:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin17:/usr/local/Homebrew/Library/Homebrew/cask/lib:/usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb --debug --verbose
/usr/local/Homebrew/Library/Homebrew/postinstall.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb
==> Summary
🍺 /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB
real 10m3.633s
user 0m1.742s
sys 0m0.874s
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 21 (9 by maintainers)
I experienced similar issues, the culprit was BitDefender Traffic Scan, which does TLS MitM in a most likely broken way, since I’ve seen it break other random HTTPS requests, like certain HEAD requests. I wasn’t able to figure out a pattern, as the software doesn’t appear to output any kind of useful logs. @mrleeio is definitely using the same software, as the certificate it uses is visible in the curl logs posted here (
CN=Bitdefender CA SSL).Disabling it (or bypassing it with a proxy) makes everything work as normal.
@MikeMcQuaid sure thing
EDIT: I forgot to mention that I tried before and after the
brew reinstall -icommand.brew sh curl
Within brew sh had to pass in the location flag for curl but the download itself was only 2.3 seconds. Seems like this command fails to reproduce the problem. Unless it is related to the redirect…
brew sh wget
Faster than curl, but failed to reproduce the problem again.
For todays episode of long upgrade times awscli is our contestant
I will come back and fill this in when it finishes (tool 11 minutes)
@claui, the download strategies have been merged and are all using
SystemCommandnow, so if this is indeed the problem it should be fixed when a new tag is released.