Building Ethereum Ubuntu 14.04 "No such file or directory" error

codepracticecodepractice Member Posts: 11
Hi
I've been following these instructions:
https://github.com/ethereum/cpp-ethereum/wiki/Building-on-Ubuntu

All the commands up until "Start your client" have worked, apart from "export CMAKE_PREFIX_PATH=/opt/Qt/5.5/gcc_64" which did nothing, so I skipped it and carried on. It did loads of downloading, building files etc. But when I type in:

cd ~/cpp-ethereum/build/eth
./eth

It says "No such file or directory".

I get the same message if I try:

cd cpp-ethereum/build/alethzero
./alethzero

I thought having done all the previous commands that those files are there and it's just not finding them for some reason. Or have I missed something?

I then tried going here:
https://github.com/ethereum/cpp-ethereum/wiki/Installing-clients

and put in:

sudo add-apt-repository ppa:ethereum/ethereum-qt
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install cpp-ethereum

but that doesn't seem to get things started. I want to try sending eth from one address to another and then see if I can figure out mining

Typing eth says command not found...

So close but yet so far!

Can anyone help?

Thanks

-codingpractice

Comments

  • kh4nkh4n Member Posts: 7

    On the develop (default) branch of cpp-ethereum git the eth folder seems to be missing. You have to checkout the master branch of the repository

    cd cpp-ethereum && git checkout master

    Remove the old build folder (try with sudo if you don't have permissions):

    rm -rf build/

    Build cpp-ethereum

    mkdir build && cd build && cmake .. && make -j2

    You should now have eth available in ~/cpp-ethereum/build/eth


    Below you have everything to build cpp-ethereum from scratch on Ubuntu 14.04 including eth


    sudo apt-add-repository ppa:george-edison55/cmake-3.x
    sudo apt-get -y update
    sudo apt-get -y install language-pack-en-base
    sudo dpkg-reconfigure locales
    sudo apt-get -y install software-properties-common
    wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
    sudo add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main"
    sudo add-apt-repository -y ppa:ethereum/ethereum-qt
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo add-apt-repository -y ppa:ethereum/ethereum-dev
    sudo apt-get -y update
    sudo apt-get -y upgrade

    sudo apt-get -y install build-essential git cmake libboost-all-dev libgmp-dev libleveldb-dev libminiupnpc-dev libreadline-dev libncurses5-dev libcurl4-openssl-dev libcryptopp-dev libjson-rpc-cpp-dev libmicrohttpd-dev libjsoncpp-dev libargtable2-dev llvm-3.8-dev libedit-dev mesa-common-dev ocl-icd-libopencl1 opencl-headers libgoogle-perftools-dev qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev libqt5webengine5-dev ocl-icd-dev libv8-dev

    git clone https://github.com/ethereum/cpp-ethereum-cmake
    git clone https://github.com/ethereum/cpp-ethereum
    cd cpp-ethereum
    git checkout master
    mkdir build && cd build && cmake .. && make -j2
  • codepracticecodepractice Member Posts: 11
    kh4n, thank you for the reply! I followed your instructions but get this error after entering

    mkdir build && cd build && cmake .. && make -j2


    23%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/Assembly.cpp.o
    virtual memory exhausted: Cannot allocate memory
    make[2]: *** [libdevcrypto/CMakeFiles/devcrypto.dir/WordList.cpp.o] Error 1
    make[1]: *** [libdevcrypto/CMakeFiles/devcrypto.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 23%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/ControlFlowGraph.cpp.o
    [ 24%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/AssemblyItem.cpp.o
    [ 24%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/ExpressionClasses.cpp.o
    [ 24%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/KnownState.cpp.o
    [ 24%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/GasMeter.cpp.o
    [ 24%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/PathGasMeter.cpp.o
    [ 25%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/BlockDeduplicator.cpp.o
    [ 25%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/ConstantOptimiser.cpp.o
    [ 25%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/CommonSubexpressionEliminator.cpp.o
    [ 25%] Building CXX object libevmasm/CMakeFiles/evmasm.dir/SemanticInformation.cpp.o
    Linking CXX shared library libevmasm.so
    [ 25%] Built target evmasm
    make: *** [all] Error 2



    I doubled the RAM (using digital ocean VPS) but got the same error again. Also
    rm -rf build/ doesn't seem to do anything.

    If I paste in your full set of instructions I get the same memory exhaustion error.

    Any help would be much appreciated thanks!
  • kh4nkh4n Member Posts: 7
    You're welcome! Hope to solve your issue.

    the rm -rf ~/cpp-ethereum/build should remove the old build directory.

    Now you can try again, with a clean, non-existent build directory and run the following from inside your cpp-ethereum folder:

    mkdir build && cd build

    cmake .. -DCMAKE_BUILD_TYPE=Release -DETHASHCL=1 -DEVMJIT=0 -DTESTS=0

    and after this make install

    Also, for the virtual memory exhausted issue, you should check out this tutorial from digitalocean:
    https://digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
  • codepracticecodepractice Member Posts: 11
    edited September 2015
    Thanks again, I got a bit further this time. Deleted droplet, started again, made swap file, went through these instructions:
    https://github.com/ethereum/cpp-ethereum/wiki/Building-on-Ubuntu

    Grabbed the source for:
    git clone https://github.com/ethereum/cpp-ethereum-cmake
    git clone https://github.com/ethereum/cpp-ethereum

    Then followed your instructions:

    mkdir build && cd build

    cmake .. -DCMAKE_BUILD_TYPE=Release -DETHASHCL=1 -DEVMJIT=0 -DTESTS=0

    make install



    Make install got all the way though 100% (rather than getting stuck at 23% with the memory problem). So it seems to have worked, except when I go back to these instructions https://github.com/ethereum/cpp-ethereum/wiki/Building-on-Ubuntu

    And try starting the client with:

    cd ~/cpp-ethereum/build/eth
    ./eth

    It still says, no such file or directory. From my terminal window:

    [email protected]:~/cpp-ethereum/build# cd ~/cpp-ethereum/build/eth
    -bash: cd: /root/cpp-ethereum/build/eth: No such file or directory


    Should I have entered:

    git checkout master

    from within ~/cpp-ethereum/

    before entering?:

    mkdir build && cd build




  • kh4nkh4n Member Posts: 7
    Yes, you should have :smile:

    Try again from the ethereum-cpp folder and after git checkout master type ls eth

    If you have a list of files as the output then you're ok and you should proceed with the build, but if you have ls: cannot access [something] then you're not on the right track.
  • codepracticecodepractice Member Posts: 11
    edited September 2015
    Victory! "Beware. You're entering the Frontier!" :)

    Ok, so created pw, got transaction signer, mining beneficiary

    One thing it has said:


    12:17:47|p2p UPnP device not found.


    If I try following these
    https://github.com/ethereum/cpp-ethereum/wiki/Using-Ethereum-CLI-Client

    typing:

    eth

    nothing happens, or typing:

    --import-presale < file >

    (replacing the word "file" with the filename) doesn't do anything either.

    How to get these commands working?

    Thank you!

    Edit: Hold up, pasted in [OPTIONS] and getting a load of stuff spat out. hmmm

    do I need to type in the full:

    Usage eth [OPTIONS] < remote-host >

    replacing remote-host with my IP?
  • codepracticecodepractice Member Posts: 11
    edited September 2015
    what I'm getting:

    eth
    [OPTIONS]
    ℹ 12:26:04|eth SLOW IMPORT: #d3f3c877… # 59679
    ℹ 12:26:04|eth Import took: 1.34127
    ℹ 12:26:04|eth preliminaryChecks: 0.000199
    ℹ 12:26:04|eth enactment: 0.000613
    ℹ 12:26:04|eth collation: 3e-06
    ℹ 12:26:04|eth writing: 1.4e-05
    ℹ 12:26:04|eth checkBest: 1.34024
    ℹ 12:26:04|eth 0 transactions
    ℹ 12:26:04|eth 0 gas used
    ⚡ 12:26:04|eth Block import 59679 1341 ms

    ℹ 12:26:21|eth SLOW IMPORT: #aa68283e… # 60588
    ℹ 12:26:21|eth Import took: 2.73518
    ℹ 12:26:21|eth preliminaryChecks: 0.00017
    ℹ 12:26:21|eth enactment: 0.000445
    ℹ 12:26:21|eth collation: 2.1e-05
    ℹ 12:26:21|eth writing: 1.4e-05
    ℹ 12:26:21|eth checkBest: 2.73418
    ℹ 12:26:21|eth 0 transactions
    ℹ 12:26:21|eth 0 gas used
    ⚡ 12:26:21|eth Block import 60588 2736 ms
    ℹ 12:26:32|eth SLOW IMPORT: #bffd7911… # 61046
    ℹ 12:26:32|eth Import took: 11.0567
    ℹ 12:26:32|eth preliminaryChecks: 0.000117
    ℹ 12:26:32|eth enactment: 0.000314
    ℹ 12:26:32|eth collation: 2e-06
    ℹ 12:26:32|eth writing: 1.4e-05
    ℹ 12:26:32|eth checkBest: 11.0556
    ℹ 12:26:32|eth 0 transactions
    ℹ 12:26:32|eth 0 gas used
    ⚡ 12:26:32|eth Block import 61046 11057 ms
    --import-presale < ethereum_wallet_backup.json>

    -h
    eth
    ✘ 12:32:33|verifier0 BlockQueue missing our job: was there a GM?
    --import-presale < ethereum_wallet_backup.json>
    eth
    --import-presale < ethereum_wallet_backup.json>

    doesn't respond to any commands, I'm stumped.
    Post edited by codepractice on
  • codepracticecodepractice Member Posts: 11
    edited September 2015
  • kh4nkh4n Member Posts: 7
    edited September 2015
    UPnP device not found means usually that you haven't got an UPnP compliant exit node (router/gateway etc) or that you are using a direct connection to the Internet.

    First of all eth is an application to which you pass some variables or options, as described in the documentation and it has a sort of dual purpose: on one hand it is a node on its own and can act like a wallet, make transactions, hold the blockchain and so on... but it also acts like a miner that does work with the machine's resources. And in fact this is how you solo mine.

    GPUs with less then 2GB of memory are not recommended for mining ethereum

    Regardless of what i'm describing below, you should have screen installed because it's helpful to run background services, so:
    sudo apt-get install screen -y

    First of all enter the following and let the blockchain sync:
    ~/cpp-ethereum/build/eth/eth -b --frontier --mining off -v 3

    When the SLOW IMPORT or the current blockNumber (#somenumber) that you will see onscreen reaches the current blockNumber ( you can check with https://etherchain.org ) you can exit eth by pressing CTRL + C up-to 5 consecutive times. Now you can start the mining procedure.

    GPU / Solo mining

    with n GPUs (replace n with your actual GPU count, ex: 2 if you have 2 ATI Video Cards)
    ~/cpp-ethereum/build/eth/eth -b --frontier --mining on -G -t n -F http://127.0.0.1:8545 -v 3
    When you see workLoops on the screen you should be mining.
    If the above is working for your needs you can now run close eth and restart it in screen:
    screen -dmS eth ~/cpp-ethereum/build/eth/eth -b --frontier --mining on -G -t n -F http://127.0.0.1:8545 -v 3 
    and view the current status of the app by running screen -x eth
    you can detach from screen by pressing CTRL + a then d
    to quit screen and close the app runing inside, instead of detaching, press CTRL + C

    CPU / Solo mining

    ~/cpp-ethereum/build/eth/eth -b --frontier --mining on -C -F http://127.0.0.1:8545 -v 3
    When you see workLoops on the screen you should be mining.
    If the above is working for your needs you can now run close eth and restart it in screen:
    screen -dmS eth ~/cpp-ethereum/build/eth/eth -b --frontier --mining on -C -F http://127.0.0.1:8545 -v 3
    and view the current status of the app by running screen -x eth
    you can detach from screen by pressing CTRL + a then d
    to quit screen and close the app runing inside, instead of detaching, press CTRL + C

    When you have multiple miners and want them all to mine in a local or remote farm then you should have a central node running eth but with no mining ( for the examples below i will use X.X.X.X as the IP address of the node, but you will have to use your own and make sure no firewall is giving you trouble with the 8545 port ) :
    screen -dmS ethnode ~/cpp-ethereum/build/eth/eth --autodag -b --frontier --mining off -j -v 3
    and view the current status of the app by running screen -x ethnode
    you can detach from screen by pressing CTRL + a then d
    to quit screen and close the app runing inside, instead of detaching, press CTRL + C

    We will now use ethminer for mining ~/cpp-ethereum/build/ethminer/ethminer

    GPU Solo mining on a FARM

    with n GPUs (replace n with your actual GPU count, ex: 2 if you have 2 ATI Video Cards) :
    screen -dmS ethminer ~/cpp-ethereum/build/ethminer/ethminer --no-precompute -F http://X.X.X.X:8545 -G -t n -v 3

    CPU Solo mining on a FARM

    screen -dmS ethminer ~/cpp-ethereum/build/ethminer/ethminer --no-precompute -F http://X.X.X.X:8545 -C -v 3
    View the current status of the app by running screen -x ethminer
    you can detach from screen by pressing CTRL + a then d
    to quit screen and close the app runing inside, instead of detaching, press CTRL + C

    On the other side of the fence you have pooled mining (this is great if you don't have a lot of hashpower because it uses a PPLNS payment system and it's similar to the FARM mode described above)
    I will use for my example weipool.org as the mining pool because they seem to need the hashpower and at the time of writing this, it's 0% fee

    GPU / Pooled mining

    with n GPUs (replace n with your actual GPU count, ex: 2 if you have 2 ATI Video Cards) :
    screen -dmS ethminer ~/cpp-ethereum/build/ethminer/ethminer -F mine.weipool.org:5555/YOUR_WALLET_ADDRESS/YOUR_ESTIMATED_HASHRATE -G -t n -v 3

    CPU / Pooled mining

    screen -dmS ethminer ~/cpp-ethereum/build/ethminer/ethminer -F mine.weipool.org:5555/YOUR_WALLET_ADDRESS/YOUR_ESTIMATED_HASHRATE -C -v 3
    View the current status of the app by running screen -x ethminer
    you can detach from screen by pressing CTRL + a then d
    to quit screen and close the app runing inside, instead of detaching, press CTRL + C

    YOUR_WALLET_ADDRESS: where your mined ether goes.
    YOUR_ESTIMATED_HASHRATE: the speed in MHs ( for example, for 1(one)x Radeon 280x you should get about 22 MHs; if you have 2 then you add the speed and so on )
    If your hashrate is > 0.1 MHs, you can pool mine and get payouts.

    NOTE: If you are GPU mining and the machine is a dedicated miner, then you should type this before you start mining, so that you can get the most out of your card (careful with the temperatures):
    export GPU_MAX_ALLOC_PERCENT=95

    Sorry if I missed anything, but you should have all you need to start mining and then some :smiley:

    Lots of luck,
  • codepracticecodepractice Member Posts: 11
    edited September 2015
    Thank you kh4n! Hit a problem straight off:

    If I enter the command before starting the client and entering the frontier, I get:


    [email protected]:~# eth -b --frontier --mining off -v 3
    eth: error while loading shared libraries: libweb3jsonrpc.so: cannot open shared object file: No such file or directory

    If I start the client I get the same problem as previously - nothing happens after entering a command:


    [email protected]:~# cd ~/cpp-ethereum/build/eth
    [email protected]:~/cpp-ethereum/build/eth# ./eth
    (++)Ethereum
    Beware. You're entering the Frontier!
    ℹ 20:17:43|eth Reading /root/.web3/keys/7f25faf6-efa8-543a-8e32-3359ac70c0f9.json
    ℹ 20:17:44|eth Opened blockchain DB. Latest: #04f0fb29… (rebuild not needed)
    ℹ 20:17:44|eth Opened state DB.

    Please enter your MASTER password:
    Ethereum (++) 0.9.41
    Code by Gav Wood et al, (c) 2013, 2014, 2015.
    Transaction Signer: stringofnumbersremovedforthispost
    (stringofnumbersremovedforthispost)
    Mining Beneficiary: stringofnumbersremovedforthispost (stringofnumbersremovedforthispost)
    Foundation: stringofnumbersremovedforthispost (stringofnumbersremovedforthispost)
    ℹ 20:18:08|p2p UPnP device not found.
    Node ID: enode://acf1d9789045ae22a74671891cdec60b1b3ca70707b7effc1ab8a09225d26c5c4[email protected]0.0.0.0:0
    eth -b --frontier --mining off -v 3
  • kh4nkh4n Member Posts: 7
    updated previous comment
  • codepracticecodepractice Member Posts: 11
    edited September 2015
    blockchain synced! Mining error though:



    ☍ ℹ 20:37:00|eth Imported and best 784979965175564786 (# 205523 ). Has 0 siblings. Route: [#2c6ec07b…, #19fe16ec…]
    ⧫ ℹ 20:37:00|eth 1 blocks imported in 2 ms ( 343.407 blocks/s)
    ~/cpp-ethereum/build/eth/eth -b --frontier --mining on -G -t n -F http://127.0.0.1:8545 -v 3

    ^C^C ⚡ 20:38:06|eth Stop worker 407 ms
    ℹ 20:38:06|eth Closing blockchain DB
    ℹ 20:38:06|eth Closing state DB
    ⚡ 20:38:06|ethsync Worker stopping 442 ms
    ⚡ 20:38:06|p2p Worker stopping 442 ms
    [email protected]:~/cpp-ethereum/build/eth# ^C
    [email protected]h3:~/cpp-ethereum/build/eth# ~/cpp-ethereum/build/eth/eth -b --frontier --mining on -G -t n -F http://127.0.0.1:8545 -v 3
    Bad -t option: n
    terminate called after throwing an instance of 'boost::exception_detail::clone_impl'
    what(): std::exception
    Aborted (core dumped)


    I've got 2GB RAM on the VPS btw. Thought I'd get it going trying GPU mining and then once working, resize the droplet.
  • kh4nkh4n Member Posts: 7
    Mate, as I was saying in the comment "with n GPUs (replace n with your actual GPU count, ex: 2 if you have 2 ATI Video Cards)"

    So replace the n
  • kh4nkh4n Member Posts: 7

    blockchain synced! Mining error though:

    I've got 2GB RAM on the VPS btw. Thought I'd get it going trying GPU mining and then once working, resize the droplet.

    You cannot GPU mine on a simple VPS... you need a dedicated Video Card with 2GB of memory. This has nothing to do with the RAM of the VPS.
  • codepracticecodepractice Member Posts: 11
    edited September 2015
    kh4n said:

    blockchain synced! Mining error though:

    I've got 2GB RAM on the VPS btw. Thought I'd get it going trying GPU mining and then once working, resize the droplet.

    You cannot GPU mine on a simple VPS... you need a dedicated Video Card with 2GB of memory. This has nothing to do with the RAM of the VPS.
    Dang. oh well, at least I can import and move my presale coins, thats my first priority.

    Thanks for the help anyway, it was educational and hopefully useful to others here too.
    Post edited by codepractice on
  • index932index932 Member Posts: 10
    I get the following error when I try to solo mine on CPU, I use my rasberry PI 2. Please advise.

    JSON-RPC problem. Probably couldn't connect. Retrying in 1...
    miner 16:10:00|eth Getting work package...
    ✘ 16:10:00|eth Failed to submit hashrate.
    ✘ 16:10:00|eth Dynamic exception type: N7jsonrpc16JsonRpcExceptionE
    std::exception::what: Exception -32003 : Client connector error: libcurl error: 7 -> Could not connect to http://127.0.0.1:8545
Sign In or Register to comment.