博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
macos安装错误_如何解决macOS的Homebrew中的404错误
阅读量:2511 次
发布时间:2019-05-11

本文共 3145 字,大约阅读时间需要 10 分钟。

macos安装错误

macos安装错误

homebrew-404-error

You’re on your Mac, when you see a 404 error. Installation simply stops. Seriously?

看到404错误时,您正在Mac上 。 安装只是停止。 认真吗

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.

Homebrew团队通常擅长查找和修复404错误,因此运行brew update通常可以解决此类问题。 但是,如果这不起作用,并且您现在需要特定的应用程序,则可以自己解决该问题。 这是如何做。

第一步:找不到自制文件 (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.

您需要做的第一件事是找到丢失的文件。 通常,第一步是查看Homebrew尝试使用的下载URL,以找到托管项目的位置。

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 , the site Homewbrew tried to download from, then head to the “Downloads” page to find the file I need.

在我的示例中,找不到的文件是mp4v2-2.0.0.tar.bz2,该文件托管在Google Code中。 这是Google最近关闭并存档的服务,这可能是问题所在。 为了进行调查,我转到 ,该网站是Homewbrew尝试从其下载的,然后转到“下载”页面以找到我需要的文件。

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.

看来Google代码已更改了其下载网址,这就是Homebrew失败的原因。 没关系:我们可以在此处单击链接手动下载文件。

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.

跟踪所需文件的过程可能有所不同,具体取决于所需文件的存储位置,但是思路是相同的。 您需要转到托管项目的页面,然后下载Homebrew所需要的确切文件。

第二步:将文件放入自制软件的缓存中 (Step Two: Put The File in Homebrew’s Cache)

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

现在已经有了文件,我们需要 Finder中 ,然后转到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.

要快速进入此文件夹,您可以在Finder中按Command Shift和G,然后粘贴~/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最近下载的一堆文件。 将刚刚下载的文件拖到文件夹中,使其与它们并排放置,如下所示:

homebrew-cache-file

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

Homebrew现在可以访问以前无法找到的确切文件。

第三步:再次运行Brew安装 (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将在缓存中找到丢失的文件。 看起来像这样:

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 for pointing out this handy workaround.

如您所见,Homebrew认为它较早下载了文件,并使用它来完成安装。 现在,您可以返回需要做的非常重要的工作。 我感谢上的指出了这一方便的解决方法。

翻译自:

macos安装错误

转载地址:http://lacwd.baihongyu.com/

你可能感兴趣的文章
HDU 2586 + HDU 4912 最近公共祖先
查看>>
POJ 3481 SBT做法
查看>>
Css 后代选择器与子代选择器的区别
查看>>
广播技术
查看>>
shell-运算符
查看>>
js 问题集锦 之 二
查看>>
MySQL-优化之 index merge(索引合并)
查看>>
20190509 感叹
查看>>
Jlink v8仿真器在64位系统上刷固件
查看>>
入门训练 Fibonacci数列
查看>>
20189222 《网络攻防技术》第一周作业
查看>>
第十二周编程总结
查看>>
数据结构——树——二叉查找树
查看>>
StringBuilder動態串
查看>>
系列文章(二):从WLAN的安全威胁,解析电信诈骗的技术症结——By Me
查看>>
内部类演示
查看>>
多态/接口
查看>>
简单的proxy之TinyHTTPProxy.py
查看>>
正式开张
查看>>
java中的注解
查看>>