[Ethereum] How would you install the Ethminer without sudo access

compilationcpp-ethereumethminerlibrary

I am trying to get Genoil's Ethminer installed on a machine without sudo access. The Github instructions require some packages to be installed.

sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y

I got a person with sudo access to install these, but only from the official Ubuntu 16.04 repositories, i.e. without doing the step described in the instructions where an additional repository is added. He's reluctant to do so and also to give me sudo.

When installing the Ethminer the same way I installed it on my home PC (And it worked btw), during compilation I get the error saying my CryptoPP is 5.6.1 version, but 5.6.2 is required.

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ctest path: /usr/bin/ctest
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find CryptoPP: Found unsuitable version "5.6.1", but required is
  at least "5.6.2" (found /usr/include)
Call Stack (most recent call first):
  cmake/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindCryptoPP.cmake:107 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/EthDependencies.cmake:44 (find_package)
  CMakeLists.txt:246 (include)

After this, I downloaded it and started compiling CryptoPP myself by following the first few steps in this guide.
This worked and the tests ran successfully. The library is now in my home folder. The problem is, I have no idea how to build the ethminer by making it use that library in my home folder, rather than the /usr/include/cryptopp folder. When I type

cmake -DBUNDLE=miner ..

It still comes up with the same error, because (obviously), it isn't aware of the library I compiled from source myself. How do I make it aware or is there an alternative?

Best Answer

If you're just testing things, set up a virtual machine, or ask whoever has sudo permissions to set up a virtual machine for you. This way you can have sudo permissions inside the vm without compromising/breaking the parent machine if something goes wrong or you screw something up.

If you're actually trying to mine for profit, I would recommend getting dedicated hardware or otherwise building a dedicated mining rig. In that case you would have sudo permissions as it would be your own system.

If for whatever reason you still want to try to be profitable mining on someone else's system without sudo access (which seems really fishy/suspicious by the way) you could always try building from source. See the README on GitHub: https://github.com/ethereum-mining/ethminer

That way any compiled binaries are kept within your home directory. If dependencies are still an issue you could always try building those from source as well. But if that's the case you'll quickly find yourself going down the dependency rabbit hole.

But I guess anything's better then running outdated software from Ubuntu's official repos :)

Related Topic