Compiling rippled on Ubuntu

There are instructions for compiling rippled on Ubuntu, but they’re not entirely clear. Sometimes you just want a script to do everything for you. Here’s something I cobbled together for Ubuntu 12.04 (you may want to modify the tag for whatever the current release of rippled is):

#!/bin/bash
set -e
sudo apt-get update; sudo apt-get -y upgrade
sudo apt-get install -y git scons ctags pkg-config protobuf-compiler libprotobuf-dev libssl-dev python-software-properties
sudo apt-add-repository -y ppa:boost-latest/ppa
sudo apt-get update
sudo apt-get install -y libboost1.55-all-dev
git clone https://github.com/ripple/rippled.git
cd rippled
git checkout tags/0.23.0
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-4.8 g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
sudo update-alternatives --set gcc /usr/bin/gcc-4.8
scons

Alternatively, you can just pull down the binary I compiled and install the associated dependencies:

#!/bin/bash
set -e
sudo apt-get update; sudo apt-get -y upgrade
sudo apt-get install -y protobuf-compiler libprotobuf7 python-software-properties
sudo apt-add-repository -y ppa:boost-latest/ppa
sudo apt-get update
sudo apt-get install -y libboost1.55-all
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-4.8 g++-4.8
curl -O "https://secure.dustin.li/rippled/rippled"
chmod +x rippled
./rippled -u

Someone also submitted a package to Debian, but that will take a while to trickle downstream.

This entry was posted in Pub. Bookmark the permalink.

Leave a Reply

Your email address will not be published.