Skip to content

Instantly share code, notes, and snippets.

@predrag-rakic
Created January 8, 2016 15:04
Show Gist options
  • Save predrag-rakic/23f610251f769e70fa26 to your computer and use it in GitHub Desktop.
Save predrag-rakic/23f610251f769e70fa26 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# This script will install Thrift compiler for C++, Python, Ruby and Elixir bindings
# It will also install Elixir and Erlang
#
set -x
# Install Erlang && Elixir
rm -f erlang-solutions_1.0_all.deb
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
rm -f erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get -y install esl-erlang
sudo apt-get -y install elixir
# Install Thrift
VER=0.9.3
NAME=thrift-${VER}
sudo apt-get -y install libboost-dev libboost-test-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
curl http://archive.apache.org/dist/thrift/${VER}/${NAME}.tar.gz | tar zx
cd ${NAME}/
# Ruby binding build fails
#./configure --without-ruby
./configure
# Build succeds second time - don't ask why!?
make
#make clean
#make
sudo make install
set +x
echo
echo To check if instalation was cuccessfull
echo thrift --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment