How to install Ethereum on Ubuntu 12.04?

I am following the installation step suggested by the ethereum site but am getting stuck with an unmet dependency. I am using Ubuntu 12.04 and also made a post on
http://askubuntu.com/questions/414293/how-to-install-ethereum so that it can help others.

At this moment I have the following error: http://i.imgur.com/aqpWXp4.png

Best Answer

Answers

  • jjjjjj Member Posts: 9
    Not sure about your error, but I am close (I get segfault running alephzero) and some things I remember:
    need g++ 4.7
    need boost 1.5.3
    need libleveldb per http://forum.ethereum.org/discussion/comment/905/#Comment_905
    You need to add ppas for above, as well as for qtbase5-dev

    (Search the web or this forum for more details since that's where I got the answers)
  • mputtermputter Member Posts: 1
    Dealing here with the same problem:
    from " ... libminiupnpc-dev : Depends: libminiupnpc8 "
    it seems that those two are incompatible.

    I found that " libminiupnpc8 set to manually installed" was the result of the bitcoin install I did earlier.

    So it seems either to remove bitcoin-qt and related packages before we can continue installing Ethereum ?
  • JonstonJonston Member Posts: 21 ✭✭
    Thanks jjj/mputter, Some more updates
    g++4.7 is now installed
    added ppa:apokluda/boost1.53
    libboost1.53-all-dev is installed
    qtbase5-dev installed
    sudo apt-get install boost 1.5.3 results in http://i.imgur.com/Jv7dAlK.png
    I do have Bitcoin installed and removing bitcoin-qt might be a work around but not practical and unsure if this works?

    'sudo apt-get install build-essential libgmp-dev libgmp3-dev libcrypto++-dev \
    git cmake libboost-all-dev automake libtool libleveldb-dev yasm unzip libminiupnpc-dev' still results in libboost-all-dev and libminiupnpc-dev unmet dependencies. (see http://i.imgur.com/aqpWXp4.png)
  • piotrpiotr Member Posts: 9
    @Jonston If you have libboost1.53-all-dev installed, why do you try to install libboost-all-dev. It is just older version of the same package (1.48 on Ubuntu 12.04 if i remember well). You don't need it any more.

    What do you try to achive with "sudo apt-get install boost 1.5.3"? There is no package with this name.

    First check again if you have properly installed libboost1.53-all-dev and other packages from list. If it's correct, just do the rest of build instructions - try to compile ethereum and dependencies.

  • numinousnuminous ParisMember Posts: 1
    I ran into the same libminiupnpc-dev dependency problem.

    I used aptitude to install it ("sudo aptitude install libminiupnpc-dev") by choosing the method that upgraded libminiupnpc8 (see url below). So far nothing seems broken and I was able to "make" ethereum successfully.

    http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies/397262#397262
  • JonstonJonston Member Posts: 21 ✭✭
    Thanks piotr / numinous!

    New update and moving forward:
    * aptitute is allready installed

    * sudo aptitude install libminiupnpc-dev
    => rejected first option and it automaticly searched for another solution. Accepted the next solution which was to downgrade "libminiupnpc8 [1.6-precise2 (now, precise) -> 1.6-3ubuntu1 (precise)]"

    * "sudo apt-get install build-essential libgmp-dev libgmp3-dev libcrypto++-dev \
    git cmake libboost-all-dev automake libtool libleveldb-dev yasm unzip libminiupnpc-dev" but changed libboost-all-dev into libboost1.53-all-dev and this resulted in no errors and no unmet dependencies.

    * Started to grab and build the latest cryptopp => all good

    * Started to grab and build the SECP256k1 crypto lib => all good

    * Then build the client using Git repo => results in an error stating that CMake Error at CMakeLists.txt:18 (message): ethereum requires g++ 4.7 or greater.
    See http://i.imgur.com/Ocxs67C.png

    * Installed g++ 4.8 which is different to http://askubuntu.com/questions/271388/how-to-install-gcc-4-8-in-ubuntu-12-04-from-the-terminal . The correct one is =>
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt-get update
    sudo apt-get install g++-4.8
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50

    *Building the client worked untill " Linking CXX executable testeth" and no I am stuck at this stage. http://i.imgur.com/mscGv3B.png
  • JonstonJonston Member Posts: 21 ✭✭
    According to @Piotr post

    If anyone had problem on "Linking CXX executable eth" part of build (Ubuntu 12.04):
    /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libleveldb.a(table_builder.o): In function `leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*)':
    (.text+0x681): undefined reference to `snappy::MaxCompressedLength(unsigned long)'

    It can be solved by removing libleveldb-dev package and manually installing those two from Ubuntu 13.04 (order is important):
    https://launchpad.net/ubuntu/raring/amd64/libleveldb1/1.9.0-1
    https://launchpad.net/ubuntu/raring/amd64/libleveldb-dev/1.9.0-1

    It mentions amd64 and not sure if that is applicable to all or only those that have a amd64 CPU? Any one can confirm this? I have an Intel(R) Core(TM) i3 CPU.
  • JonstonJonston Member Posts: 21 ✭✭
    Ok...It's working!

    *used for libleveldb i386 and not amd64
    https://launchpad.net/ubuntu/saucy/i386/libleveldb1/1.9.0-1
    https://launchpad.net/ubuntu/saucy/i386/libleveldb-dev/1.9.0-1
    * deleted the cpp-ethereum-build folder and cpp-ethereum folder and built it again.

    *Then followed the remaining step of building the GUI client and Ethereum is now working.

    Let's see what is next...
Sign In or Register to comment.