Skip to content

Instantly share code, notes, and snippets.

@timvlaer
Created March 21, 2017 12:35
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save timvlaer/721ba30f8fc6a7aac1b0190e132a4261 to your computer and use it in GitHub Desktop.
Save timvlaer/721ba30f8fc6a7aac1b0190e132a4261 to your computer and use it in GitHub Desktop.
Install Thrift 0.9.3 with brew on macOS
brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9d524e4850651cfedd64bc0740f1379b533f607d/Formula/thrift.rb
@ipender
Copy link

ipender commented Jan 12, 2018

this works fine, thanks~

@xincao9
Copy link

xincao9 commented Jan 25, 2018

非常感谢,爷们

Copy link

ghost commented Feb 11, 2018

Thanks!!

@bohdansasko
Copy link

Thanks 👍

@LuQQiu
Copy link

LuQQiu commented Mar 7, 2018

Thanks! Great help!

@shobhits147
Copy link

thanx man

@bocai-h
Copy link

bocai-h commented May 21, 2018

thanks man, good job
but why I clone the homebrew code and find the thrift 0.10.0 commit
then I checkout to this commit and use brew install ./Formula/thrift.rb can't work

@fzalila
Copy link

fzalila commented Sep 19, 2018

Error: thrift: Unsupported special dependency :python
Any idea how to fix this bug?

@mortonrj
Copy link

I'm also getting the error thrift: Unsupported special dependency: python and haven't found a way to fix the bug.

@chrislusf
Copy link

Use this. Fixed issues with python dependency.

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

@cceasy
Copy link

cceasy commented Oct 25, 2018

Use this. Fixed issues with python dependency.

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

works for me, thanks

@bakatz
Copy link

bakatz commented Jan 31, 2019

note that with the latest version of brew on mojave, you can just run brew install thrift@0.9 and then add the thrift binaries to your $PATH. this works for me so far (thrift@0.9 seems to be an official pkg with no dependency issues)

@goodspb
Copy link

goodspb commented Feb 13, 2019

note that with the latest version of brew on mojave, you can just run brew install thrift@0.9 and then add the thrift binaries to your $PATH. this works for me so far (thrift@0.9 seems to be an official pkg with no dependency issues)

thanks!

@linmingze
Copy link

66666

@shadowmind
Copy link

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

Thanks.

@CaoYan1
Copy link

CaoYan1 commented Jun 2, 2019

Use this. Fixed issues with python dependency.

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

Thanks

@handsaomeboy
Copy link

Use this. Fixed issues with python dependency.

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

hi,thank you . Then,your method provides the way of downloading the version of 0.9.3,but i want to download the version 0.10.(how can i do to get 0.10. without error "python dependency"?)

@MrTuring
Copy link

MrTuring commented Sep 5, 2019

Use this. Fixed issues with python dependency.

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

you are awesome, man

@littlebeandog
Copy link

thanks

@carasue
Copy link

carasue commented Feb 24, 2020

Oh yeah! thx 🎉

@unLeer
Copy link

unLeer commented Mar 19, 2020

brew install https://gist.githubusercontent.com/chrislusf/8b4e7c19551ba220232f037b43c0eaf3/raw/01465b867b8ef9af7c7c3fa830c83666c825122d/thrift.rb

I've got an error:
DownloadError: Failed to download resource "icu4c" Download failed: https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-src.tgz
Any ideas how to fix this?

@farkwun
Copy link

farkwun commented Apr 16, 2020

In order to generalize this to any past Thrift version, the form of the brew install can be found by…

1. Pulling down the homebrew-core repository : https://github.com/Homebrew/homebrew-core/commits/master
2. $ git log master -- Formula/thrift.rb 
3. Find the commit ID for the thrift version you want (may be multiple - I just grabbed the first one that had 0.12.0 in the commit message)
4. brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/<commit-ID>/Formula/thrift.rb

Alternatively,

1. Pulling down the homebrew-core repository : https://github.com/Homebrew/homebrew-core/commits/master
2. $ git log master -- Formula/thrift.rb 
3. Find the commit ID for the thrift version you want (may be multiple - I just grabbed the first one that had 0.12.0 in the commit message)
4. $ git checkout <commit-ID>
5. $ brew install Formula/thrift.rb

will also work.

@bgraban
Copy link

bgraban commented Apr 23, 2020

This is exactly what I needed. Thank you farkwun

@liuyu121
Copy link

hi t try this but it does NOT work :

Error: Calling Non-checksummed download of thrift formula file from an arbitrary URL is disabled! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.

WHY?

@farkwun
Copy link

farkwun commented Oct 3, 2020

hi t try this but it does NOT work :

Error: Calling Non-checksummed download of thrift formula file from an arbitrary URL is disabled! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.

WHY?

Right, so, I gave two options - the error message you listed says that they're no longer allowing download of thrift formula files from an arbitrary URL, but the second method doesn't require you to do that.

Doing a git checkout <commit-ID> then running brew install Formula/thrift.rb still totally works.

@sgauri
Copy link

sgauri commented Nov 16, 2020

thrift 0.9.3 commit-id is 9d524e4850651cfedd64bc0740f1379b533f607d

@goodspb
Copy link

goodspb commented Jul 20, 2021

in 2021, you need to do this:

1、brew unlink thrift
2、brew install thrift@0.9
3、echo 'export PATH="/usr/local/opt/thrift@0.9/bin:$PATH"' >> ~/.zshrc

@annelieselu
Copy link

in 2021, you need to do this:

1、brew unlink thrift
2、brew install thrift@0.9
3、echo 'export PATH="/usr/local/opt/thrift@0.9/bin:$PATH"' >> ~/.zshrc

This will install thrift 0.9.3.1 under usr/local/opt/
If you need thrift under usr/local/bin, do brew link thrift@0.9 (Caution. Check if there is already another version of thrift.)

@shepting
Copy link

shepting commented Jan 2, 2024

I believe this is failing again:

brew install thrift@0.9
Error: thrift@0.9 has been disabled because it is a versioned formula!

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