Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install go-ethereum client on Ubuntu 14.04
#!/bin/sh
if ! lsb_release -sr | grep 14.04 > /dev/null; then
echo "This script is made for Ubuntu 14.04, this probably won't work."
echo -p "Do you want to try it anyway? (y/n) " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
echo "\033[1mInstalling Go and QT5 from PPA\033[0m"
echo "This may prompt for your password."
if ! dpkg -s qtbase5-private-dev > /dev/null; then
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get -qq update
fi
sudo apt-get install -yqq golang git mercurial ubuntu-sdk qtbase5-private-dev \
qtdeclarative5-private-dev libqt5opengl5-dev libgmp3-dev libreadline6-dev
if [ -z "$GOPATH" ]; then
echo "\n\033[1mExporting environment variables.\033[0m"
cat >> $HOME/.profile << "EOF"
# Go environment:
PATH=$PATH:$HOME/go/bin:/usr/local/go/bin
export GOPATH=$HOME/go
EOF
# Equivalent to `source` in `sh`
. $HOME/.profile
fi
echo "Dependencies satisfied."
echo "\n\033[1mNow installing the ethereum client\033[0m"
mkdir -p $HOME/go
go get -u github.com/ethereum/go-ethereum/ethereal
go get -u github.com/ethereum/go-ethereum/ethereum
echo "\n\033[1mInstallation complete\033[0m"
cat << "EOF"
You can now start Ethereal by issuing:
cd $GOPATH/src/github.com/ethereum/go-ethereum/ethereal && ethereal
If you rather run without a GUI you can start ethereum by issuing the 'ethereum'
command. More informations on:
https://github.com/ethereum/go-ethereum/wiki
EOF
@mquandalle

This comment has been minimized.

Copy link
Owner Author

mquandalle commented May 29, 2014

Modifications from https://gist.github.com/maran/8dc397ed79331f16e284/8cdf7cf83a5cdb58cd5ea4fa28c6389e862ef58e:

  • Use sh instead of bash
  • Install golang from the ubuntu official repository
  • Export PATH and GOPATH in ~/.profile instead of ~/.bashrc
  • Check if GOPATH exists before writing in .profile (so this script could also be used to update the client)
  • Check if ppa is already present before adding it (again, in case of an update)
  • Clean the output
  • Improve confirmation (y/n) check
  • style: wrap in 80 columns

One line go-ethereum installer for Ubuntu 14.04:

$ curl https://gist.githubusercontent.com/mquandalle/ab0d31735e57010ce206/raw/13c0a08ddecae75355b853f7a00e97ca1d230124/install | sh
@karimlahlou

This comment has been minimized.

Copy link

karimlahlou commented Jun 13, 2014

I installed go-ethereum on ubuntu 14.04 but, when I run this command cd $GOPATH/src/github.com/ethereum/go-ethereum/ethereal && ethereal I get this "ethereal: command not found". Please advice.

@charlierlee

This comment has been minimized.

Copy link

charlierlee commented Aug 11, 2014

I get the same error. Please advise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.