How to install Ethereum in Linux and test mining!!!

KinkaKinka Member Posts: 4
Step 1: Preparation

You need a Linux box ready for development this is in Linux Server x64
and know how to make some things ;-)

Step 2: Install Go

https://go.googlecode.com/files/go1.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.2.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin (add it to your .profile file ,too)


Step 3: Install Mercurial

sudo apt-get install mercurial

Step 4: Install GMP

wget https://gmplib.org/download/gmp/gmp-5.1.3.tar.bz2
cd /gmp-5.1.3.tar.bz2
./configure
make
make check
sudo make install


Step 5: Install Ethereum

mkdir ether
cd ether/
export GOPATH=~/ether/
go get -u -t github.com/ethereum/go-ethereum
cd ./bin

./go-ethereum -m

you are now test mining in Ethereum !


All credits go to : Ursium
Great post !
Thanks !!

Comments

  • KinkaKinka Member Posts: 4
    edited January 2014
  • spraffspraff Member Posts: 15
    During go get -u github.com/ethereum/go-ethereum I get these errors
    
    # github.com/ethereum/ethutil-go
    src/github.com/ethereum/ethutil-go/encoding.go:57: undefined: strings.IndexByte
    src/github.com/ethereum/ethutil-go/helpers.go:16: undefined: sha256.Sum256
    src/github.com/ethereum/ethutil-go/helpers.go:22: undefined: sha256.Sum256
    
    I'm a programmer but not a Go programmer. I think something might be wrong with the import section at the top of encoding.go but I don't know if it's a problem in the repository or with my setup.

    I installed golang with apt-get on Ubuntu 13.10.
  • rasheedmoorerasheedmoore Member Posts: 1
    Looks like I am having a similar problem w/ Mint Olivia http://hastebin.com/yifevuxovi.avrasm
  • bjtbjt Member Posts: 17
    Ubuntu 12.04 here, and I'm having the same problem rasheedmoore is. I tried adding a return statement in the affected function in secp256.go on my own copy and the library built (in the separate dir) without an error, but I'm not sure this solves the real problem. I submitted a pull request that contains my small change to the library.
  • salhadaarsalhadaar Member Posts: 26
    uhhh... latest centos and got this error, doesn't seem like an installation problem.

    ether/src/github.com/ethereum/eth-go/peer.go:174: block.MakeContracts undefined (type *ethchain.Block has no field or method MakeContracts)
  • terrymullettterrymullett Member Posts: 2
    I got the same result as salhadaar on a fresh-ish ubuntu 12.04, following the instructions precisely (no pun intended)

    fresh-ish = fresh + ubuntu packages build-essential automake libcurl4-openssl-dev git python-software-properties libtool
  • CoinerCoiner Member Posts: 17
    That's the code problem. Not the only one, btw. Looks like git "subprojects" are out of sync, after the last commit about 2 days ago.
  • bjtbjt Member Posts: 17
    After resolving my other issues with installation (probably because I was using Go 1 instead of 1.2), I've run into the same problem salhadarr has.

    I wonder if it's because in peer.go, the line

    block.MakeContracts()

    Is possibly a typo, or a function is missing. I looked for a MakeContracts function in github.com/ethereum/ethchain-go/block.go and only found MakeContract().
  • MilanMilan San Diego, CAMember Posts: 46
    Just for giggles, I changed MakeContracts to MakeContract in peer.go.

    Didn't work, obviously, since MakeContract requires an argument...

    func (block *Block) MakeContract(tx *Transaction) {
  • terrymullettterrymullett Member Posts: 2
    Works for me now :-)
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    If you guys found issues with the code on github, can you please submit pull requests? We can collaborate that way :)
  • romanixromanix Member Posts: 10
    @Kinka: I had:
    make: *** No targets specified and no makefile found. Stop.

    A step 3 1/2 was needed:
    sudo apt-get install m4
  • salhadaarsalhadaar Member Posts: 26
    edited January 2014
    +++++++ MINED BLK +++++++ woohoo :P

    Quick question - does anybody know how to set up the LD_LIBRARY_PATH now that libgmp.so.10 is in /usr/local/lib. I'm currently running this command -

    LD_LIBRARY_PATH=/usr/local/lib ./go-ethereum -m

    but there must be a better, more permanent way.

    EDIT - Centos 6.4
  • allr1allr1 Member Posts: 8
    So I am now mining with the ./go-ethereum -m
    Clicks off a new block about every 15 seconds. I am now at block 1033.
    Are these blocks I have worked on, or shares I have found?
    What would all of this mean if I was mining for real?
    Is there documentation that would tell me how to interpret the output?
    Running on Linux_64. No problems in getting the executable built. Very good instructions above.
  • bjtbjt Member Posts: 17
    salhadaar, in CentOS, you can always set your global environment variables by stashing a shell script in /etc/profiles.d/

    For example, you could add a file called /etc/profiles.d/ld_lib.sh and it would contain the following code:
    #!/bin/sh
    export LD_LIBRARY_PATH=/usr/local/lib
    You can also manage your ldconfig this way: http://www.cyberciti.biz/faq/linux-setting-changing-library-path/
  • bjtbjt Member Posts: 17
    My go-ethereum is happily "mining" blocks but I'd really love to know how to create transactions. The dev console only shows me a few commands:
    COMMANDS:
    = DB =
    update KEY VALUE - Updates/Creates a new value for the given key
    get KEY - Retrieves the given key
    root - Prints the hex encoded merkle root
    rawroot - Prints the raw merkle root
    = Dagger =
    dag HASH NONCE - Verifies a nonce with the given hash with dagger
    = Encoding =
    decode STR
    encode STR
    Where can I find out more about what I can do with these commands? I can "decode" and "encode" single words but I don't know what that's good for.
  • salhadaarsalhadaar Member Posts: 26
    Awesome, thank you.
  • Benjamin_BBenjamin_B Member Posts: 12
    edited January 2014
    Very cool. How many ether in a block, how many blocks in an hour?

    And this is 'test mining' right? When will *real* mining be launched?
    Post edited by Benjamin_B on
  • mjackson001mjackson001 Member Posts: 9
    FWIW, I was getting the same errors as spraff on my Ubuntu box. I fixed it by removing the Ubuntu 'go' package and installing go from the latest source: http://golang.org/doc/install/source
  • skateskate Member Posts: 1
    qmake: could not find a Qt installation of ''
    i am getting this error, any ideas?
  • VetruvianVetruvian Member Posts: 17
    qmake: could not find a Qt installation of ''
    i am getting this error, any ideas?
    You can try: sudo apt-get install qt5-default

    This tells the system qt5 is the default versions to use.
  • ffwongffwong Member Posts: 3
    Just compiled the qt on Ubuntu. But got this:
    Opened blockchain db. Latest: b2579caa489a929ce383cf3ddbfa9515d860382df667195ab0ff64dac88de74c
    Segmentation fault (core dumped)

    Anything I missed?
  • achillezachillez Member Posts: 7
    Ok I can successfully compile but when I run it I get spammed with a new nonce every ms. Is the testnet even up right now?
  • capa66capa66 Member Posts: 1
    worked for me np on 64bit deb 7 . mining blocks, not much in the logs. will keep an eye on this
Sign In or Register to comment.