How to update ZcashCli?

Strange…when I did zcashd --version it showed me the older version and I did the update and upgrade. The issue should be with the PATH, as you mentioned it before. How could I change it?

zcashd --version
Zcash Daemon version v2.0.0

should I do this?

git clone GitHub - zcash/zcash: Zcash - Internet Money
cd zcash/
git checkout v2.0.3
./zcutil/fetch-params.sh

How did you install originally, perhaps via ther package manager in which case a sudo apt update && apt upgrade will work.

which zcashd will show you where the oudated binary is you are running.

Those instructions you can use, but you’ll then need to manually build zcashd and start the binary accordingly (it’ll be in the src directory). It’ll probably just be easier to repeat how you initially installed be it via package manager or download the binaries directly and copy to your /usr/local/bin directory.

Ah I missed that you did that. In that case take very careful note of the output of the apt command. I’m guessing you might hit a private key error and so zcashd wasn’t actually upgraded as the key was rotated and needs to be updated. See this: Debian Binary Packages Setup — Zcash Documentation 5.2.0 documentation but long story short just run wget -qO - https://apt.z.cash/zcash.asc | sudo apt-key add - and update, upgrade again.

there are no errors, still the same problem. It has been installed the latest but when I check it is still the older one. Perhaps it’s the path and I have installed two zcash in two different ways.

Right and without knowing how you initially installed this… Trying which zcashd will show you the location of the (outdated) binary you are running when running the command zcashd --version. So there are 3 ways you could have installed this:

1 - Package manager. If so sudo apt update and sudo apt upgrade will resolve this assuming there are no public key errors (ref Debian Binary Packages Setup — Zcash Documentation 5.2.0 documentation)
2 - Downloading the binaries. You may have downloaded the binaries, extracted and copied these files into your PATH e.g. usr/bin/local or modified your PATH to include a directory containing these binaries (ref Binary Tarball Download & Setup — Zcash Documentation 5.2.0 documentation)
3 - Compiled from source and then as above either copied the binaries into an existing PATH directory or modified your PATH (ref User Guide — Zcash Documentation 5.2.0 documentation)

To resolve this (again without knowing how you originally did this) find the output of which zcashd, download and extract the latest binaries and move and overwrite those in the original location. You can find the download link from here: Binary Tarball Download & Setup — Zcash Documentation 5.2.0 documentation

2 Likes

thanks a lot! I replaced the bin folder and now it’s the newest version and it’s working well!
Cheers! :slight_smile:

2 Likes

Hey brother, having an issue updating again. Have been away and my wallet is on : zcash daemon version v2.0.5-2

when running zcashd i get the following error:

Thank you for running a Zcash node!
You’re helping to strengthen the network and contributing to a social good :slight_smile:

In order to ensure you are adequately protecting your privacy when using Zcash,
please see https://z.cash/support/security/.

Since starting this node 8 seconds ago:
Since starting this node 21 seconds ago:

  • You have validated no transactions.

Init message: Loading block index…

[Press Ctrl+C to exit] [Set ‘showmetrics=0’ to hide]
zcashd: chain.cpp:93: CBlockIndex* CBlockIndex::GetAncestor(int): Assertion `pindexWalk->pprev’ failed

I already ran sudo apt-get update / sudo apt-get upgrade and now this is what happens.

Any idea whats going on here?

Thank you in advance.

1 Like

I am not sure as to the error, you would have to open a GitHub issue. What command are you using to start? There seem to be a few Bitcoin issues logged e.g. Assertion when restarting after a crash with pruning · Issue #9001 · bitcoin/bitcoin · GitHub.

That being said if you want to get up and running, I’d suggest bumping up to 2.0.7-2. Take a careful look as to the output of the update/upgrade command as if you still have that version then something isn’t right. Are you using TOR as I know that the apt repo there is currently down?

When on 2.0.7-2 you may need to try a reindex if that error still occurs.

ok restarted my PC and that stopped. Now it says to upgrade like normal… : Thank you for running a Zcash node!
You’re helping to strengthen the network and contributing to a social good :slight_smile:

In order to ensure you are adequately protecting your privacy when using Zcash,
please see https://z.cash/support/security/.

Since starting this node 20 seconds ago:

  • You have validated no transactions.

Messages:

  • Error: This version has been deprecated as of block height 598012. You should upgrade to the latest version of
    Zcash.

Init message: Rewinding blocks if needed…

[Press Ctrl+C to exit] [Set ‘showmetrics=0’ to hide]
┌─[✗]─[xxxx@parrot]─[~]

I tried again

sudo apt-get update / sudo apt-get upgrade and still im stuck on the same version it doesnt upgrade anything. No I am not using TOR atm.

┌─[✗]─[xxxxx@parrot]─[~/.zcash]
└──╼ $zcash-cli -version
Zcash RPC client version v2.0.5-2

Maybe the apt version is being overridden by an earlier version somewhere else in your path?

  • whereis zcash-cli will tell you where the binary you used above is (zcash-cli -version returns the version of the binary itself, not of the server it is able to talk to).
  • whereis zcashd will tell you where the zcashd binary is (but IDK how your node is being started, so that may or may not correspond to what is on your user’s path).
1 Like

Thank you will play around with this when I’m home later. Will update soon

update: no idea what issue was but I fixed it. Just had to wipe and reinstall from scratch …backed up keys obviously so was no issue. Not sure why it happened. Thank you everyone for the help

1 Like

I take that back. Everything downloaded fine and node was running fine. I restarted it and booted it up again and it would just crash right after saying verifying blocks. I am now in the process of reindexing again. Took 20hr last time. I will write the exact error here if it happens again.