Daily Archives: 2017/07/12

Install and run nheqminer-0.5c on Ubuntu Server 16.04


  • Declare 4 lines of Path in .profile
    • $ sudo nano .profile
    • Add these:
      • LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/lib64/stubs”
      • PATH=”$PATH:/usr/local/cuda-8.0/”
      • PATH=”$PATH:/usr/local/cuda-8.0/bin”
      • CUDA_CUDART_LIBRARY=”/usr/local/cuda-8.0/lib64/libcudart.so”


  • Install nheqminer:
    • $ git clone https://github.com/nicehash/nheqminer.git
    • $ cd nheqminer/cpu_xenoncat/asm_linux/
    • $ sh assemble.sh
    • (if permission denied: $ sudo chmod +x * to set permission)
    • $ mkdir build
    • $ cd build
    • $ make -j $(nproc)


  • Test nheqminer in benmark mode with CPU:
    • $ cd build (go to app folder if needed)
    • $ ./nheqminer -b


  • Run with CPU (example with 8 cores: from 0-7)
    • $ ~/build$ ./nheqminer -l us.zec.slushpool.com:4444 -u user.worker -t 8


  • Run with GPU (example with 1 core: from 0):
    • ~/build$ ./nheqminer -l us.zec.slushpool.com:4444 -u user.worker -cd 0



  • $ before above commands denote start of line, do not keep it ($) when copying commands to terminal windows)
  • Error while running nheqminer: CUDA error ‘an illegal memory access was encountered’ in func ‘solve’ at line xxxx. Possible reason: Old graphic cards don’t support CUDA 8.0
  • Error in installing nheqminer: Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY). Solution: add CUDA_CUDART_LIBRARY in environment as shown above.



Install Boost 1.64 in Ubuntu 16.04

– Uninstall the current Boost if exist:

$ sudo apt-get –purge remove libboost-dev

$ sudo apt-get –purge remove libboost-all-dev

$ sudo apt-get –purge autoremove libboost-all-dev

– Install Boost in Ubuntu 16.04 from PPA (only up to Boost version 1.55):

$ sudo add-apt-repository ppa:boost-latest/ppa

$ sudo apt-get update

Now you can install the version you desire, the latest at the time of writing is 1.55 (version from 2014, as seen in 2017/07, no newer version available; see more):

$ sudo apt-get install libboost1.55-all-dev

– Install Boost 1.58 from package in Ubuntu 16.04 (latest version inside emmbeded package is only 1.58, while actual latest version is 1.64 – as of 2017/07):

$ sudo apt-get install libboost-dev

$ sudo apt-get install libboost-all-dev

– Install Boost 1.64 from Boost.org (latest version as of 2017/07):

– Download source file from: http://www.boost.org/users/history/version_1_64_0.html

– Put it in a folder (if) you want to, then run the below commands:

$ tar -xzvf boost_1_64_0.tar.gz
$ cd boost_1_64_0
$ ./bootstrap.sh
$ ./b2

– Verify installed Boost version:

$ dpkg -s libboost-dev | grep Version


$ cat /usr/include/boost/version.hpp | grep “BOOST_LIB_VERSION”

If error or not found: Boost is not installed.


Install nVidia GPU driver in Ubuntu 16.04

– Install nVidia GPU driver in Ubuntu 16.04:

$ sudo apt-get purge nvidia-*

$ sudo add-apt-repository ppa:graphics-drivers/ppa

(install nVidia drivers from PPA source)

$ sudo apt-get update

$ sudo apt-get install nvidia-375

(version 375 is current long-lived branch release as of 2017/07, check latest version here. If want to use newer versions, change version number, e.g. nvidia-375 –> nvidia-384)

$ sudo reboot

(reboot to activate GPU drive)

– Check nVidia driver version:

$ nvidia-smi

If the driver is correctly installed, the result is as image below:



How to check Bitcoind block chain download progress level

After install Bitcoin Core in Ubuntu server, run $ bitcoind – daemon to start bitcoin node. It will download all bitcoin blocks to the local server.

  • To check the block download progress, use the below command to see the number of block that has already been downloaded.

$ bitcoin-cli getblockcount

  • Then open the below website to see the current total amount of blocks on public block chain browsers:


  • Compare 2 numbers to calculate downloading progress.