xmr-stak-cpu 在Centos 7挖矿

安装编译

yum -y install epel-release
yum -y install centos-release-scl cmake3 hwloc-devel libmicrohttpd-devel openssl-devel git screen nano
yum -y install devtoolset-4-gcc*
scl enable devtoolset-4 bash
git clone https://github.com/fireice-uk/xmr-stak-cpu.git
cd xmr-stak-cpu
cmake3 .
make install

如果出现一下情况,需要升级gcc

-- The C compiler identification is GNU 5.3.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: /opt/rh/devtoolset-4/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-4/root/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/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:27 (message):
  g++ version must be at least 5.1!

升级GCC




wget http://ftp.gnu.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.bz2 
tar -jxvf gcc-6.1.0.tar.bz2  
cd gcc-6.1.0  
./contrib/download_prerequisites
mkdir build  
cd build
../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib


你可能感兴趣的:(xmr-stak-cpu 在Centos 7挖矿)