SHARE
homebrew

How to Work Around a 404 Error in Homebrew for MacOS

homebrew-404-error

You’re installing some packages with homebrew  on your Mac, when you see a 404 error. Installation simply stops. Seriously?

 The homebrew team is generally good about finding and fixing 404 errors, so running brew update will generally solve such problems. But if that doesn’t work, and you need a particular application right now, you can work around the issue yourself. Here’s how.

Step One: Find The File Homebrew Cannot

The first thing you need to do is find the missing file. Generally the first step is to look at the the download URL Homebrew tried to use to find where the project is hosted.

In my example, the file that couldn’t be found was mp4v2-2.0.0.tar.bz2, which is hosted at Google Code. That’s a service Google shut down and archived recently, which might be the problem. To investigate, I head to mp4v2.googlecode.com, the site Homewbrew tried to download from, then head to the “Downloads” page to find the file I need.

homebrew-mp4v2

It seems like Google Code has changed the URLs for their downloads, which is why Homebrew failed. No matter: we can download the file manually right here by clicking the link.

Your process for tracking down the file you need might look a little different, depending on where the files you need are stored, but the idea is the same. You need to head to the page where the project is hosted and download the exact file Homebrew was looking for.

Step Two: Put The File in Homebrew’s Cache

Now that we’ve got the file, we need to access the hidden Library folder in the Finder, then head to the Homebrew cache. From the Library folder go to Caches > Homebrew.

homebrew-cache-folder

To get to this folder quickly you can press Command Shift and G in the Finder, then paste ~/Library/Caches/Homebrew.

homebrew-cask-fast

You’ll see a bunch of files that Homebrew has recently downloaded. Drag the file you just downloaded to the folder so it’s alongside them, like this:

homebrew-cache-file

Homebrew now has access to the exact file it couldn’t find before.

Step Three: Run Brew Install Again

The hard part is done! Attempt to install the software just like you did before, and Homebrew will find the missing file in the cache. Here’s what that looks like:

homebrew-file-already-downloaded

As you can see, Homebrew thinks it downloaded the file earlier, and uses it to complete the installation. You can now get back to whatever very important work it is that needs doing. My thanks to Jason Verly over at MyGeekDaddy.net for pointing out this handy workaround.

SHARE
Previous articleHow to Add Control Panel to Windows’ Context Menu
Next articleHow to Stop Facebook Videos from Auto-Playing
Technewborn is a leading problogging platform that covers the latest in technology, news, social media, mobile industry, apps, games, and more. I have been researching, writing, reading, living in it since 2009. I try adding a unique taste to whatever techy I write. You can follow me on below Social Network

LEAVE A REPLY

Please enter your comment!
Please enter your name here