Compiling cgminer on Ubuntu GNU/Linux

From X86wiki
Jump to: navigation, search


Compiling cgminer on Ubuntu or Mint (Debian derivative distros) the most commonly encountered difficulty is 1) the lack of source file headers for the USB library, and 2) the libcurl library

for 1)

# apt-get install libusb-dev 

Should do the trick; if it does not, you might have to download the libusb-1.0 source code via git and do a fresh compile. We like to put source code folders into /usr/local/src

# git clone git://
# mv libusb/ /usr/local/src

for 2)

 Go to: and download the latest source; Move it to /usr/local/src. In there:

make install

The Compile

Set CFLAGS environment variable

 #CFLAGS="-02 -Wall -march=native"

Configure with any special options (in this case the Block Erupter USB ASIC miner)

 #./configure --enable-icarus

libusb headers ubuntu

Source Sites