Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid formula: /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/buck.rb

I ran the brew command to install Facebook homebrew tap. I have a M1 Apple Silicon Chipset and use a terminal under Rosetta for brew commands.

brew tap facebook/fb

I got the error message:

==> Tapping facebook/fb
Cloning into '/usr/local/Homebrew/Library/Taps/facebook/homebrew-fb'...
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 333 (delta 27), reused 24 (delta 13), pack-reused 287
Receiving objects: 100% (333/333), 5.44 MiB | 9.18 MiB/s, done.
Resolving deltas: 100% (179/179), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/buck.rb
buck: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the facebook/fb tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/buck.rb:19

Warning: Calling depends_on :osxfuse is deprecated! There is no replacement.
Please report this issue to the facebook/fb tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/facebook/homebrew-fb/xar.rb:8

Error: Cannot tap facebook/fb: invalid syntax in tap!

I searched for the facebook/fb tap on Google, I found a GitHib repo but reporting errors is unactivated: https://github.com/facebook/homebrew-fb

like image 630
Xiiryo Avatar asked Oct 14 '22 23:10

Xiiryo


1 Answers

The simplest solution you can do is fork the Facebook/FB repository into your GitHub account then change the 19th line in buck.rb file. It should be like this:

old one: depends_on java: "1.8"

new one: depends_on "openjdk@8"

The reason we do this Buck still relies on Java 8. After you do this you can simply open your terminal and write:

brew tap {yourGithubAccountName}/homebrew-fb

then

brew install buck 
like image 156
Mehmet Baykar Avatar answered Oct 20 '22 15:10

Mehmet Baykar