如何将 Homebrew 恢复到以前的状态? [英] How to get back Homebrew to previous state?

查看:29
本文介绍了如何将 Homebrew 恢复到以前的状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从文件夹 /usr/local/Homebrew/Library/Taps/中删除了一些 .rb 文件(cassandra.rb、cassandra@2.1.rb 和 cassandra@2.2.rb)homebrew/homebrew-core/Formula/ 来自 mac 系统.我想找回那些 .rb 文件.
我以为 brew upgrade 会把那些删除的 .rb 文件还给我.但是他们仍然失踪.那些 .rb 文件对我安装软件包很重要.
brew install cassandra 给出

I deleted some of .rb files(cassandra.rb,cassandra@2.1.rb and cassandra@2.2.rb) from folder /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ from mac system.I want back those .rb files.
I thought brew upgrade will give me back those deleted .rb files back.But they are still missing. Those .rb files are important for me to install packages.
brew install cassandra gives

Updating Homebrew...
Error: No available formula with the name "cassandra" 
==> Searching for a previously deleted formula...
cassandra was deleted from homebrew/core in commit d20fe73:
  cassandra: update 3.10_1 bottle.

To show the formula before removal run:
  git -C "$(brew --repo homebrew/core)" show d20fe73^:Formula/cassandra.rb

If you still use this formula consider creating your own tap:
  http://docs.brew.sh/How-to-Create-and-Maintain-a-Tap.html

请问我需要解决方案如何取回这些 .rb 文件?"安装 cassandra 的任何其他替代方法".

Please I need solution "how to get back these .rb files?" or "any other alternative way to install cassandra".

推荐答案

直接从 GitHub 安装,如这里所述 -如何恢复冲泡配方

Install directly from GitHub as mentioned here - How to restore brew formula after I rm it

brew install https://github.com/Homebrew/homebrew-core/tree/master/Formula/cassandra.rb

这篇关于如何将 Homebrew 恢复到以前的状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆