menu search
brightness_auto
more_vert
I am trying to install XMR Stak CPU Miner on Raspberry PI 3 running Jessie , XMR Stak is to be built with CMAKE which requires c++ Compiler older than 5.1 but Raspberry comes with compiler version 4.9
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike

1 Answer

more_vert
 
done_all
Best answer

Intall XMR-STAK-CPU - Electroneum

a very fast, cost-effective, open source solution. First off, we will have to install dependencies of the program. We will also have to compile it, so we need software for that, too. Run:

sudo apt install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev

Then, download the miner:

wget https://github.com/fireice-uk/xmr-stak-cpu/archive/master.zip

Unzip it:

unzip master.zip

Enter the new directory:

cd xmr-stak-cpu-master

Run CMake:

cmake .

After you’re done, install the miner:

make install

It should create a "bin” folder. Enter the folder:

cd bin

If Cmake gives error

cmake .
CMake Error at CMakeLists.txt:27 (message):
GCC version must be at least 5.1!

It means you have older C++ Compiler , Update compiler in Rasberry Pi 3 running Jessie

Open a Terminal and start by upgrading all your packages from the default Raspbian repository (depending on the speed of your Internet connection this could take some time):

sudo apt-get update
sudo apt-get upgrade

Next, open /etc/apt/sources.list in your favorite editor and repalce jessie with stretch:

sudo nano /etc/apt/sources.list

Update your package list:

sudo apt-get update

and, finally, install GCC 6:

sudo apt-get install gcc-6 g++-6

Last step is to revert back from Stretch to Jessie, open /etc/apt/sources.list and replace stretch with jessie, after that do an update to refresh the package list:

sudo vim /etc/apt/sources.list
sudo apt-get update

The above procedure will keep GCC 4.9 as the default C and C++ compiler for any package that depends on it, if you want to compile a program with GCC 6 you will have to use gcc-6 or g++-6 when invoking the compilers

cmake -DCMAKE_CXX_COMPILER=g++-6.1.0 -DCMAKE_C_COMPILER=gcc-6.1.0 .

thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
Welcome to Ask Techie
Ask questions and receive answers from other members of the community. Hacking, Technology, Gaming, Programming, Blockchain and everything to get you going with your Cyber World.

222 questions

227 answers

401 comments

726,785 users

...