What's the download directory and file name for resouces?

I am behind the firewall that some packages I can not downloaded directory via brew command. So I would like to know what’s the download directory and filename format for the required resources.

For example, I got the download error when try to install ripgrep with linuxbrew:

curl: (22) The requested URL returned error: 403 Forbidden
Error: An exception occurred within a child process:
DownloadError: Failed to download resource “docbook–xml42”
Download failed: https://docbook.org/xml/4.2/docbook-xml-4.2.zip

When I got the docbook-xml-4.2.zip, where should I put it and what the name it should be to make sure the linuxbrew command can pick it up?

Welcome @ezchi!

Just in case you haven’t found a solution yet:

Were you able to download from a browser on the same machine? If so, your browser may be configured to use a corporate proxy, and you may be able to configure Homebrew to use that same proxy in order to fix the Homebrew issue permanently.

For this to work, you need to figure out your proxy IP address and port number, then set a couple of environment variables as explained in the man page.

I recommend that you try this out before attempting other solutions. If you get it to work, it’s going to spare you a bit of maintenance hassle in the long run.

Let me know if this works out.

I had the proxy configured correctly. But for some links the proxy only allow download through browser.

How did you configure your proxy? What are the exact commands/variables you set?

I have configured http_proxy=“http://host:port” and https_proxy=“https://host:port”. And I can install most application with brew install but not all of them depends where the package is downloaded from.

If the package can not be downloaded from command line, copy/paste the broken link into browser can download it.

Please don’t mangle important information like that. If there’s a typo somewhere in there, everyone will be sent on a wild goose chase.

Just to be sure, what is the unedited output of:

$ env | grep -i proxy

?

Pick one formula that’s causing you problems, and post the following:

  1. The name of the package
  2. The URL that brew is unable to download
  3. The unedited output of curl -vsOL <package_url> for that package URL