Alpine Linux Alpine

You can use official binary downloads for this OS, with linux-static-x64 suffix.

Basic build

Basic build is good for local machine, because it is easy, but if you need to run the miner on other machines please take a look at advanced build. To install hwloc-dev package you must enable testing repository in /etc/apk/repositories file.

1. apk add git make cmake libstdc++ gcc g++ libuv-dev openssl-dev hwloc-dev
2. git clone https://github.com/xmrig/xmrig
3. mkdir xmrig/build && cd xmrig/build
4. cmake ..
5. make -j$(nproc)

Advanced build

We use build_deps.sh script to build recent versions of libuv, openssl and hwloc as static libraries. We also use option -DBUILD_STATIC=ON to create a fully static executable without any dependencies, GPUs backeds not compatible with this option, resulting binary will be CPU only.

1. apk add git make cmake libstdc++ gcc g++ automake libtool autoconf linux-headers
2. git clone https://github.com/xmrig/xmrig.git
3. mkdir xmrig/build
4. cd xmrig/scripts && ./build_deps.sh && cd ../build
5. cmake .. -DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON
6. make -j$(nproc)