<url> malformed, download from /bottles/ failed


(Shumin Y) #1

I was just trying to install clang-format by running command “brew install clang-format” and got below messages:

==> Downloading /bottles/clang-format-2018-04-24.high_sierra.bottle.tar.gz
curl: (3) malformed
Error: Failed to download resource “clang-format”
Download failed: /bottles/clang-format-2018-04-24.high_sierra.bottle.tar.gz

how could this happen? do I have to specify the url somewhere or doesn’t it have a default value?
thank you.


(Mike McQuaid) #2

You likely have set HOMEBREW_BOTTLE_DOMAIN to a bad value.


(Chris Zelenak) #3

Thanks for this. Just noting that I also received this error on a build service ( appcenter.ms ) with what I assume was a “clean” homebrew install. They may have been trying to set HOMEBREW_BOTTLE_DOMAIN themselves, I don’t have the ability to verify easily.


(Nathan Stocks) #4

I am having a really similar error on TravisCI lately, but I haven’t changed any CI setup at all!

In my case, the command I’m running on Travis is:

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install zmq ; fi

and the relevant output looks like:

==> Downloading /bottles/zeromq-4.2.5.sierra.bottle.tar.gz
curl: (3) <url> malformed
Error: Failed to download resource "zeromq"
Download failed: /bottles/zeromq-4.2.5.sierra.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Installing dependencies for zeromq: docbook, asciidoc, docbook-xsl, gnu-getopt, xmlto
==> Installing zeromq dependency: docbook
==> Downloading /bottles/docbook-5.0.sierra.bottle.3.tar.gz
curl: (3) <url> malformed
Error: Failed to download resource "docbook"
Download failed: /bottles/docbook-5.0.sierra.bottle.3.tar.gz
Warning: Bottle installation failed: building from source.
...

It goes on, and zeromq is never installed, which breaks my build.

I have no clue why this would suddenly break on TravisCI, when it had been working fine before.


(Nathan Stocks) #5

Just for some additional context, in the build that succeeded immediately before the failed build I posted above, the output was simply:

==> Downloading https://homebrew.bintray.com/bottles/zeromq-4.2.5.sierra.bottle.tar.gz
==> Pouring zeromq-4.2.5.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/zeromq/4.2.5: 77 files, 2.7MB

The version number is the same in both cases. ZeroMQ has been pretty quiet in recent years. 4.2.5 has been out since March.


(Mike McQuaid) #6

Travis CI turns off our autoupdate. Run brew update before your build.


(Nathan Stocks) #7

@MikeMcQuaid Adding brew update fixed it for me – thanks!!!


(Shumin Y) #8

the HOMEBREW_BOTTLE_DOMAIN wasn’t set to any value. do I need to set it to a certain value or can I just leave it to no value?


(Mike McQuaid) #9

Run brew update for now. This will be fixed (and no longer needed) in a future release.


(Shumin Y) #10

thank you. it was already done by “building from resource”. I will try this in the future.


(Mike McQuaid) #11

This is fixed even for auto-update as of Homebrew 1.6.13.