How to mine Zcash

I could not get that to work either on Ubuntu until I removed the backslashs and made it all one line. Also, be careful that some commands in the instructions require you to be in the zcash directory. For example, the upgrade and testing instructions.

3 Likes

Thanks for the suggestions. I’ve tried re-typing the command on one line but am still getting the same error. I’m going to start over with a fresh install of Ubuntu and see what happens.

Those backslashes are interpretted as escape characters that continue one line to the next. The easiest way to follow the Public Alpha Guide example is to copy and paste whole example sections from it into your console window.

You probably don’t need to reinstall Ubuntu but, either way, pay particular attention to the command output of the initial steps. btw How much memory and swap space does your system have?

1 Like

You might need to do a ā€œsudo apt-get install updateā€. If that doesn’t work, check that your package repo locations in /etc/apt/sources.list look correct. libgtest-dev has been available in Ubuntu since Precise: Ubuntu – Package Search Results -- libgtest-dev

1 Like

Thanks for the replies. I started over and here is my hardware/software setup:
Ubuntu 16.04
USB 16GB with 4GB casper-rw partition (When I tried to increase this using Gparted I couldn’t get the USB to boot anymore so I reverted to the 4GB persistent partition)
Toshiba laptop with 4GB RAM
As far as I can tell, I don’t have any swap space set up.
Does it look like my hardware is adequate?

apt-get upgrade worked fine.
apt-get update failed with a critical error while moving old database out of the way. See exact error message below. Thanks for any advice.

ubuntu@ubuntu:~$ sudo apt-get update
Ign:1 cdrom://Ubuntu 16.04 LTS Xenial Xerus - Release amd64 (20160420.1) xenial InRelease
Hit:2 cdrom://Ubuntu 16.04 LTS Xenial Xerus - Release amd64 (20160420.1) xenial Release
Get:4 Index of /ubuntu xenial-security InRelease [94.5 kB]
Get:5 Index of /ubuntu xenial InRelease [247 kB]
Get:6 Index of /ubuntu xenial-updates InRelease [95.7 kB]
Get:7 Index of /ubuntu xenial-security/main amd64 Packages [123 kB]
Get:8 Index of /ubuntu xenial/main amd64 Packages [1,201 kB]
Get:9 Index of /ubuntu xenial-security/main Translation-en [48.1 kB]
Get:10 Index of /ubuntu xenial-security/main amd64 DEP-11 Metadata [42.3 kB]
Get:11 Index of /ubuntu xenial-security/main DEP-11 64x64 Icons [50.8 kB]
Get:12 Index of /ubuntu xenial/main Translation-en [568 kB]
Get:13 Index of /ubuntu xenial-security/restricted amd64 DEP-11 Metadata [158 B]
Get:14 Index of /ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]
Get:15 Index of /ubuntu xenial/main DEP-11 64x64 Icons [409 kB]
Get:16 Index of /ubuntu xenial-updates/main amd64 Packages [328 kB]
Get:17 Index of /ubuntu xenial-updates/main Translation-en [125 kB]
Get:18 Index of /ubuntu xenial-updates/main amd64 DEP-11 Metadata [192 kB]
Get:19 Index of /ubuntu xenial-updates/main DEP-11 64x64 Icons [155 kB]
Get:20 Index of /ubuntu xenial-updates/restricted amd64 DEP-11 Metadata [157 B]
Fetched 4,412 kB in 28s (154 kB/s)

** (appstreamcli:4292): CRITICAL **: Error while moving old database out of the way.
AppStream cache update failed.
Reading package lists… Done

1 Like

My guess is that even with a large swap partition your system is unlikely to be able to compile Zcash and the tests are also likely to require more memory.

However… Once compiled, Zcash should be able to run within 4GB.

1 Like

I created a bootable USB with Ubuntu 16.04 and 4GB of persistent storage on a different USB drive…
Then I hard-wired my desktop which has 12GB Ram to my router.
But I am still getting the same error as above when I say ā€œsudo apt-get updateā€

** (appstreamcli:4292): CRITICAL **: Error while moving old database out of the way.
AppStream cache update failed.

Thanks to everyone who has replied. Even if your replies don’t directly solve my problem, they stimulate my thinking and just knowing someone is looking at it helps motivate me not to give up.

i tried this way by myself. 4GB of persistent storage → it is not enough. try to install ubuntu like a a hdd on the stick.

Thanks. I tried several times to make a persistent space greater than 4GB by using Gparted, but when I did that, the USB stopped showing up on my menu of bootable devices.

I installed Ubuntu onto a 16GB flash drive without making a separate home partition - the home folder just ends up amoung all the other system folders.

Thank you. That was my problem. I was hesitant to actually install Ubuntu because I was afraid it might overwrite my Windows OS, but as long as you’re careful it works fine. A good article and video about how to install Ubuntu onto a USB is: http://www.fernhilllinuxproject.com/guidesandhowtos/installubuntutousbdrive.html

So using a 16GB USB 2.0 flashdrive and a 4-year old laptop with 4GB ram, I was able to compile zcash, run the first group of tests successfully, run the zcash server, try a few simple commands, and begin mining on the testnet.

1 Like

Well done! I’m surprised as my first attempt to compile the z1 realease failed on the 6GB system I was using at the time…

1 Like

Is it for linux only ?
I cant find window version of it
Thank

Yes, currently only linux

Hi ThomasRScott,

I’m also a mac user looking to do the same thing. I’m pretty sure I can install Debian without any trouble, but was just wondering if you used and could recommend any install guides for zcashd, and how that relates to the bitcoin.conf file?

On another note, can anyone explain why it uses a bitcoin.conf file? Is this standard practice, or will it use it’s own .conf file when the mainnet is up?

Thanks!

You might like to check out these links:

The naming issue is due to Zcash starting as a fork of the Bitcoin Core source.

1 Like

bitcoin.conf was renamed to zcash.conf in the z3 release (the current release is z8).

2 Likes

To avoid adding to this very long thread I have moved the more technical questions to another thread:

4 posts were merged into an existing topic: I began mining. I have a question

I am not tech savvy but want a way to acquire zcash early on. I have 40 M/h ASIC scrypt miner and from what I understand (almost none) I wont be able to mine this coin at launch. Is the only way to mine with gpu and I assume only solo mine from for a couple days till pools start. What kind of exchanges are planned? I think this coin will have a very high valuation that will outpace reward distribution.

Currently, the public Zcash miner is CPU only. A GPU miner and pool mining are not available yet - at least not publicly.