Skip to content

Instantly share code, notes, and snippets.

@tonydeng
Last active January 10, 2024 17:05
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save tonydeng/02e571f273d6cce4230dc8d5f394493c to your computer and use it in GitHub Desktop.
Save tonydeng/02e571f273d6cce4230dc8d5f394493c to your computer and use it in GitHub Desktop.
Install Thrift 0.11.0 with brew on macOS
#!/bin/bash
brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4ba654c6d99b3b6804dd3843546a9dcbb700188b/Formula/thrift.rb
@mrioan
Copy link

mrioan commented Dec 6, 2020

Invalid usage: Installation of thrift from a GitHub commit URL is unsupported! 'brew extract thrift' to stable tap on GitHub instead. (UsageError)

@tmsblgh
Copy link

tmsblgh commented Jan 18, 2021

Try

brew tap-new $USER/local-tap
brew extract --version='0.11.0' thrift $USER/local-tap
brew install thrift@0.11.0

@splunk-chowiel
Copy link

@tmsblgh Thanks that worked!

@datavisorchengjiefu
Copy link

==> Downloading https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz
==> Downloading from https://dlcdn.apache.org/thrift/0.11.0/thrift-0.11.0.tar.gz
#=#=-# #
curl: (22) The requested URL returned error: 404
Trying a mirror...
==> Downloading https://downloads.apache.org/thrift/0.11.0/thrift-0.11.0.tar.gz
-#O#- # #
curl: (22) The requested URL returned error: 404 Not Found
Error: thrift@0.11.0: Failed to download resource "thrift@0.11.0"
Download failed: https://downloads.apache.org/thrift/0.11.0/thrift-0.11.0.tar.gz

@shalk
Copy link

shalk commented Sep 8, 2022

0.11.0

open /opt/homebrew/Library/Taps/!!!your user name!!!/homebrew-local-tap/Formula/thrift@0.11.0.rb

change https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz to
"https://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz"

@freemandealer
Copy link

thanks to @tmsblgh that works!

@chencchen
Copy link

Thank you, after testing, this solution is successful on the M1 chip macbook.

@alberttwong
Copy link

atwong@Alberts-MBP Formula % brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4ba654c6d99b3b6804dd3843546a9dcbb700188b/Formula/thrift.rb

Error: No such keg: /opt/homebrew/Cellar/thrift
Error: Installation of thrift from a GitHub commit URL is unsupported! `brew extract thrift` to a stable tap on GitHub instead.
atwong@Alberts-MBP Formula % brew tap-new $USER/local-tap
brew extract --version='0.11.0' thrift $USER/local-tap
brew install thrift@0.11.0
Error: /opt/homebrew/Library/Taps/atwong/homebrew-local-tap/README.md already exists
==> Searching repository history
Error: Could not find thrift! The formula or version may not have existed.
Warning: No available formula with the name "thrift@0.11.0". Did you mean thrift@0.9?
==> Searching for similarly named formulae and casks...
==> Formulae
thrift@0.9

To install thrift@0.9, run:
  brew install thrift@0.9
atwong@Alberts-MBP Formula % brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4ba654c6d99b3b6804dd3843546a9dcbb700188b/Formula/thrift.rb

Error: No such keg: /opt/homebrew/Cellar/thrift
Error: Installation of thrift from a GitHub commit URL is unsupported! `brew extract thrift` to a stable tap on GitHub instead.

@alberttwong
Copy link

alberttwong commented Jun 12, 2023

atwong@Alberts-MBP ~ % brew --version
Homebrew 4.0.22
atwong@Alberts-MBP ~ % brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4ba654c6d99b3b6804dd3843546a9dcbb700188b/Formula/thrift.rb
@mrioan

Error: No such keg: /opt/homebrew/Cellar/thrift
Error: Installation of thrift from a GitHub commit URL is unsupported! `brew extract thrift` to a stable tap on GitHub instead.
zsh: command not found: @mrioan

@alberttwong
Copy link

just FYI.... homebrew told me to make my own homebrew of which I'm using thrift 0.13 https://github.com/alberttwong/homebrew-thrift

@helloworlde
Copy link

Worked for me:

brew unlink thrift
brew tap homebrew/core
brew tap-new $USER/local-tap
brew extract --version='0.11.0' thrift $USER/local-tap
sed -i '' 's|https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz|https://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz|' /opt/homebrew/Library/Taps/$USER/homebrew-local-tap/Formula/thrift@0.11.0.rb
brew install thrift@0.11.0

@Jap8nted
Copy link

Jap8nted commented Jan 10, 2024

Hi, when I run
brew extract --version='0.11.0' thrift $USER/local-tap
I get:
No available formula with the name "homebrew/core/thrift".

What could be the reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment