Skip to content

Instantly share code, notes, and snippets.

@2niuhe
Last active March 30, 2024 12:45
Show Gist options
  • Save 2niuhe/f9c0a1168ebc02bd0b89ffdb7ed21f6c to your computer and use it in GitHub Desktop.
Save 2niuhe/f9c0a1168ebc02bd0b89ffdb7ed21f6c to your computer and use it in GitHub Desktop.
install XMRig on termux

Monero XMR mining via termux ;ubuntu

  1. install ubuntu in termux command; (ubuntu is optional)
pkg install update && upgrade
apt install git
apt install wget
apt install proot
termux-setup-storage
git clone https://github.com/Neo-Oli/termux-ubuntu
cd termux-ubuntu
chmod +x ubuntu.sh
sh ubuntu.sh
./start-ubuntu.sh
  1. install xmrig cpu miner to ubuntu termux
apt update
apt upgrade
apt install git
apt install wget
apt install proot
apt-get install git build-essential cmake libuv1-dev libmicrohttpd-dev libssl-dev

git clone https://github.com/xmrig/xmrig
cd xmrig
mkdir build
cd bulid
cmake -DWITH_HWLOC=OFF ..
make

then you can creat a config.json file in /build dir ngayon copy nyo ang url galing sa minergate para maka pag mining kayo

./xmrig -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45700 -u magtangol2018@gmail.com -p x -3

or palitan nyo ng email nyo ang ginawa kung sample.. salamat wag kalimutang mag subscribe para ma update kayo sa mga bagong t

@wjoshua1984
Copy link

cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:76: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:164: src/3rdparty/argon2/CMakeFiles/argon2.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
Pls help me

Do this --> https://pastebin.com/Q6Nu93VE

[ 1%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o [ 1%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_cubehash.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/genkat.c.o [ 2%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/keccakf800.c.o make[2]: *** [src/3rdparty/libethash/CMakeFiles/ethash.dir/build.make:76: src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/crypto/ghostrider/CMakeFiles/ghostrider.dir/build.make:76: src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_blake.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:104: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/encoding.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:90: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/core.c.o] Error 1

No bro not work same Error 😔

Delete everything that was built during the process and start over. If you're running android version that can handle xmrig that pastebin should work. If you do not know what to delete just delete termux and reinstall it

@Salooter
Copy link

cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:76: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:164: src/3rdparty/argon2/CMakeFiles/argon2.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
Pls help me

Do this --> https://pastebin.com/Q6Nu93VE

[ 1%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o [ 1%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_cubehash.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/genkat.c.o [ 2%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/keccakf800.c.o make[2]: *** [src/3rdparty/libethash/CMakeFiles/ethash.dir/build.make:76: src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/crypto/ghostrider/CMakeFiles/ghostrider.dir/build.make:76: src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_blake.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:104: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/encoding.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:90: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/core.c.o] Error 1
No bro not work same Error 😔

Delete everything that was built during the process and start over. If you're running android version that can handle xmrig that pastebin should work. If you do not know what to delete just delete termux and reinstall it

Ok bro

@Salooter
Copy link

cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:76: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:164: src/3rdparty/argon2/CMakeFiles/argon2.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
Pls help me

Do this --> https://pastebin.com/Q6Nu93VE

[ 1%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o [ 1%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_cubehash.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/genkat.c.o [ 2%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/keccakf800.c.o make[2]: *** [src/3rdparty/libethash/CMakeFiles/ethash.dir/build.make:76: src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/crypto/ghostrider/CMakeFiles/ghostrider.dir/build.make:76: src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_blake.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:104: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/encoding.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:90: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/core.c.o] Error 1
No bro not work same Error 😔

Delete everything that was built during the process and start over. If you're running android version that can handle xmrig that pastebin should work. If you do not know what to delete just delete termux and reinstall it

Screenshot_20220328-212523_Termux
Screenshot_20220328-212537_Termux
Screenshot_20220328-212441_Termux

@wjoshua1984
Copy link

Yeah I'm not sure then, I see you use Honey gain so I assume your android version is new enough. I've never encountered errors such as this.

@wjoshua1984
Copy link

cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:76: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:164: src/3rdparty/argon2/CMakeFiles/argon2.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
Pls help me

Do this --> https://pastebin.com/Q6Nu93VE

[ 1%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o [ 1%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_cubehash.c.o cc: error: unrecognized command-line option ‘-maes’ cc: error: unrecognized command-line option ‘-maes’ [ 2%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/genkat.c.o [ 2%] Building C object src/3rdparty/libethash/CMakeFiles/ethash.dir/keccakf800.c.o make[2]: *** [src/3rdparty/libethash/CMakeFiles/ethash.dir/build.make:76: src/3rdparty/libethash/CMakeFiles/ethash.dir/ethash_internal.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/crypto/ghostrider/CMakeFiles/ghostrider.dir/build.make:76: src/crypto/ghostrider/CMakeFiles/ghostrider.dir/sph_blake.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... cc: error: unrecognized command-line option ‘-maes’ make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:104: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/encoding.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [src/3rdparty/argon2/CMakeFiles/argon2.dir/build.make:90: src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/core.c.o] Error 1
No bro not work same Error 😔

Delete everything that was built during the process and start over. If you're running android version that can handle xmrig that pastebin should work. If you do not know what to delete just delete termux and reinstall it

Screenshot_20220328-212523_Termux Screenshot_20220328-212537_Termux Screenshot_20220328-212441_Termux

Forgot to reply on my last comment. Anyhow, in this original thread they have you installing Ubuntu which is totally unnecessary since android is already basically Linux. If you we're using that method I would scrap all that and use just the pastebin I posted.

If those errors still remain im unsure what is going on though I've never encountered these type of errors before it seems like there's a previous process not finished yet that the script needs.

Anyhow aside from scrapping everything and starting as fresh as can be Im not sure of what else can be done to correct these type of errors.

@Salooter
Copy link

Salooter commented Mar 28, 2022 via email

@Salooter
Copy link

Salooter commented Mar 28, 2022 via email

@bundysplayhouse
Copy link

I never got this working spent ages trying and ened up using userland for installing Ubuntu bionic and this guide for installing xmrig https://xmrig.com/docs/miner/build/ubuntu
I personally used the advanced guide. And one thing I must add that I found out is it won't work unless after you 1st sudo apt update run apt-get install apt-utils xmrig won't install and apt upgrade also won't work

@Salooter
Copy link

Salooter commented Mar 28, 2022 via email

@bundysplayhouse
Copy link

Thanks for the tip!

On Mon 28 Mar, 2022, 11:01 PM bundysplayhouse, @.> wrote: @.* commented on this gist. ------------------------------ I never got this working spent ages trying and ened up using userland for installing Ubuntu bionic and this guide for installing xmrig https://xmrig.com/docs/miner/build/ubuntu I personally used the advanced guide. And one thing I must add that I found out is it won't work unless after you 1st sudo apt update run apt-get install apt-utils xmrig won't install and apt upgrade also won't work — Reply to this email directly, view it on GitHub https://gist.github.com/f9c0a1168ebc02bd0b89ffdb7ed21f6c#gistcomment-4113471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW33VYGMUNFC77CCU6B4CTTVCHUFTANCNFSM4TN66LQA . You are receiving this because you commented.Message ID: @.***>

No problems

@Anirudh110504
Copy link

IMG-20220329-WA0000
IMG-20220329-WA0002
IMG-20220329-WA0001
Am unable to solve this error,i have uninstalled and reinstalled mu termux several times but not yet found solution to this,can i get this solved

@bundysplayhouse
Copy link

I had similar issues I ended up using userland to install Ubuntu bionic and this guide to install xmrig https://xmrig.com/docs/miner/build/ubuntu
Once you have installed Ubuntu run sudo apt update and after that run sudo apt-get install apt-utils other wise xmrig won't install and sudo apt upgrade won't work

@Salooter
Copy link

Salooter commented Mar 29, 2022 via email

@TukangM
Copy link

TukangM commented Jul 31, 2022

if get error cuz you not run on ubuntu proot or other distro. @everyone

@TukangM
Copy link

TukangM commented Jul 31, 2022

for arm cpu boost cmake -DARM_TARGET= -DWITH_HWLOC=OFF ..
override ARM target, possible values 7 (ARMv7) and 8 (ARMv8).
cmake -DARM_TARGET=8
cmake -DWITH_HWLOC=OFF -DARM_TARGET=8 ..

@Salooter
Copy link

Salooter commented Oct 11, 2022 via email

@TomGhost1
Copy link

Screenshot_20221022-203745
Pliss help

@TukangM
Copy link

TukangM commented Oct 26, 2022

Killed by limited ram. CPU hard to compute xmrig

@Blackdyh01
Copy link

Screenshot_2023-01-12-12-26-36
O que esta dando errado?

@khansaad1275
Copy link

khansaad1275 commented Jan 31, 2023

image
Getting this error.

found solution : use this to clone ubantu rather then the link in this post https://github.com/MFDGaming/ubuntu-in-termux

@legionobody
Copy link

Una consulta. Cómo es posible que esté minando sin recibir lo que mine en mi cake wallet ? Alguien me ayude plis, gracias.

@faithnorvic0319
Copy link

How to fix dns error?
Uploading Screenshot_20230402-195601.jpg…

@faithnorvic0319
Copy link

Screenshot_20230402-195601
How to fix this? Dns error?

@Saikatsaha1996
Copy link

Screenshot_20230402-195601 How to fix this? Dns error?

Wrong pool address

@TukangM
Copy link

TukangM commented Apr 2, 2023

How to fix this? Dns error?

blocked by isp, banned in some country, etc
try change to cloudflare dns

@Zipp10lite
Copy link

for arm cpu boost cmake -DARM_TARGET= -DWITH_HWLOC=OFF .. override ARM target, possible values 7 (ARMv7) and 8 (ARMv8). cmake -DARM_TARGET=8 cmake -DWITH_HWLOC=OFF -DARM_TARGET=8 ..

Def. Fixed it ,
Install all mentioned from apt (libs ,proot, wget, git)
While in build dir use rm * -r to clear the bad cmake/make
For arm a53 32 bit use 7 and for a55 and above use 8 as -DARM_TARGET= (as above)

https://gist.github.com/2niuhe/f9c0a1168ebc02bd0b89ffdb7ed21f6c?permalink_comment_id=4523874#gistcomment-4523874
How to fix dns error:

Navigate to chrome and type the following url:
chrome://net-internals#dns

Click on clear host cache , that fixed it for me I think (or the clean git clone / build)

Doesn't hurt reinstalling termux (btw works without ubuntu)

Cheer's:)

@Zipp10lite
Copy link

Screenshot_20230402-195601 How to fix this? Dns error?

Friend you have errors in config.json or cli , try retyping it correctly (without the -u argument in config file )

Cheer's 🍻

@eli32-vlc
Copy link

it just say killed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment