-
-
Save maran/2d69089ed5ea3f83fde8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -i | |
# This script will install Ethereum-Go and all dependencies. | |
# Please download and make it executable and run it as such to make sure the script reloads bashrc | |
# wget https://gist.github.com/maran/2d69089ed5ea3f83fde8 -O install | |
# chmod +x install | |
# ./install | |
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 -e "\033[1mInstalling Go and QT5 from PPA\033[0m" | |
echo "This may prompt for your password." | |
if ! dpkg -s qtbase5-private-dev 2> /dev/null; then | |
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa | |
sudo apt-get -q 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 -e "\n\033[1mExporting environment variables.\033[0m" | |
cat >> $HOME/.bashrc << "EOF" | |
# Go environment: | |
PATH=$PATH:$HOME/go/bin:/usr/local/go/bin | |
export GOPATH=$HOME/go | |
EOF | |
# Equivalent to `source` in `sh` | |
. $HOME/.bashrc | |
fi | |
echo "Dependencies satisfied." | |
echo -e "\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 -e "\n\033[1mInstallation complete\033[0m" | |
cat << "EOF" | |
Before continuing please source ~/.bashrc or open a new terminal. | |
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 |
The problem with .bashrc
is that the file is not loaded for zsh users (me). Maybe there is a better location? Do you know what debian packages that need an env variable use?
While installing I got the following error.
Now installing the ethereum client
# github.com/obscuren/serpent-go
../go/src/github.com/obscuren/serpent-go/all.cpp:1:30: fatal error: serpent/bignum.cpp: No such file or directory
#include "serpent/bignum.cpp"
^
compilation terminated.
# github.com/obscuren/serpent-go
../go/src/github.com/obscuren/serpent-go/all.cpp:1:30: fatal error: serpent/bignum.cpp: No such file or directory
#include "serpent/bignum.cpp"
^
compilation terminated.
These steps fixed it
cd ~/go/src/github.com/obscuren/serpent-go
git submodule init
git submodule update
cd $GOPATH/src/github.com/ethereum/go-ethereum/ethereum
go install -v
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changes from https://gist.github.com/mquandalle/ab0d31735e57010ce206
bash
instead ofsh
dpkg -s
errors(GO)PATH
to .bashrc since .profile only loads on login shells, which you don't use 99% of the time