How to update ZcashCli?

Hello friends, I have been out of town for some time. I fired up my Zcash node and notice that I am in need of an update. What is the easiest way for me to upgrade my software? I used this video: - YouTube when setting my wallet up. I am running ubuntu on Windows Subsystem for Linux FYI

2 Likes

As it was installed via package manager (as per the video) simply sudo apt-get update && sudo apt-get upgrade will work. Then you need to restart zcashd (so if you are running as a daemon then stop it with zcash-cli stop and start it up again zcashd -daemon).

You can check you have the right version then with zcashd --version or zcash-cli --version

3 Likes

Also, if you wanted to keep everything on Windows you could just take the WinZec download and run the packaged zcashd from there (assuming you wanted the CLI). You’ll find it in something like C:\Program Files\winzec\app as zcashd.exe. You could then simply export your wallet from the current version (zcash-cli z_exportwallet mywallet - note you need to specify an export dir before doing this) and then copy this file and import to the new machine with zcash-cli.exe z_importwallet mywallet.

Windows builds should be fully supported pretty soon too :grinning:

1 Like

@garethtdavies thank you for your assistance, should be able to figure things out no worries. Hope all has been well with you brother.

@garethtdavies hello brother - blazin here again. I am trying to upgrade to the latest wallet in preperation for Sapling!!! (cant wait) however when i use the sudo apt-get update command i get the following errors: Err:1 https://apt.dockerproject.org/repo debian-stretch InRelease
Temporary failure resolving ‘apt.dockerproject.org
Err:2 http://deb.parrotsec.org/parrot stable InRelease
Temporary failure resolving ‘deb.parrotsec.org
Err:3 https://apt.z.cash jessie InRelease
Temporary failure resolving ‘apt.z.cash’
Reading package lists… Done
W: Failed to fetch https://apt.dockerproject.org/repo/dists/debian-stretch/InRelease Temporary failure resolving ‘apt.dockerproject.org
W: Failed to fetch http://deb.parrotsec.org/parrot/dists/stable/InRelease Temporary failure resolving ‘deb.parrotsec.org
W: Failed to fetch https://apt.z.cash/dists/jessie/InRelease Temporary failure resolving ‘apt.z.cash’
W: Some index files failed to download. They have been ignored, or old ones used instead.

This looks like a DNS issue. Have you ruled out any connection issues with the machine?

odd brother, seemed to update fine after I tried a few times but now when running zcashd i got an error for zcash params … so had to do zcash-fetch-params. it failed to dl the params the first few times …had to type zcash-fetch-params a few times for it to work… odd …but it worked now.

thanks for the help

1 Like

Yeh that’s expected behaviour for v2.x as you need the additional Sapling parameters. Sounds like you might have a bit of an intermittent, either internet connection, or DNS issues?

solid got it. what exactly will need to be done in the wallet on the 28th of October? Just another simple sudo apt-get update? what is the release coming on Oct28? I understand this current version is 2.0.1

Nothing. You are good to go assuming you stopped zcashd and restarted? Any 2.x release is compatible with Sapling but you need 2.0.1 to use most of the RPC commands, say if you wanted to actually transact with Sapling.

October 28th is the Sapling upgrade see Sapling - Zcash

1 Like

I think it was an issue with the VPN + tor tunnel had in background. disabled and worked like a charm.

thanks for your help again brother. - looking forward to the 28th!!

1 Like

hey brother I am trying to update again this time to 2.0.2 and ran into an error:

┌─[xxxx@parrot]─[~/.zcash]
└──╼ $sudo apt-get update
[sudo] password for xxxx: xxxx
Hit:1 http://deb.parrotsec.org/parrot stable InRelease
Ign:2 https://apt.z.cash jessie InRelease
Get:3 https://apt.z.cash jessie Release [2,287 B]
Get:4 https://apt.z.cash jessie Release.gpg [833 B]
Err:4 https://apt.z.cash jessie Release.gpg
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2A798EF998940FA
Hit:5 https://apt.dockerproject.org/repo debian-stretch InRelease
Fetched 3,120 B in 4s (696 B/s)
Reading package lists… Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://apt.z.cash jessie Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2A798EF998940FA
W: Failed to fetch https://apt.z.cash/dists/jessie/Release.gpg The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2A798EF998940FA
W: Some index files failed to download. They have been ignored, or old ones used instead.

do you know what the issue is here ?

This is expected as the signing key was updated. See Debian Binary Packages Setup — Zcash Documentation 5.2.0 documentation and the Missing Public Key Error section.

Basically just run wget -qO - https://apt.z.cash/zcash.asc | sudo apt-key add - to add the new key and then sudo apt-get update again followed by an apt-get upgrade and it’ll work.

1 Like

ah I was about to just try this. feel dumb for asking this now, simple fix! thank you brother I am all up to date!

1 Like

Hello,
This thread has been useful to me. I have the latest version, but still it says i should update. Any ideas?

What does zcashd -version return? What startup command are you using, as perhaps you are not starting the one installed from the package? Finally, it looks like from the above zcashd was stopped but make sure via zcash-cli stop then restart.

@garethtdavies thank you for your answer.
I am using zcashd as a starting command. Yeah, I am starting somehow the older version. How should I start the new one?

So, I don’t know how you installed it but if you can start with zcashd then it’s in your PATH. Trying which zcashd will show you the location. So maybe you installed the original by either the package manager (apt-get install) or downloaded the binaries and copied to your /usr/bin or similar directory?

How did you download the latest version? If you downloaded the binaries then you’d start by entering ./zcashd to start the binary in the current directory and not the one in your usr/bin directory.

If you did use the package manager, a simple apt-get update && apt-get upgrade will grab the latest release (you might need a new public key if it warns you).

1 Like

Hello, I don’t remember exactly, but I suppose it was with the package manager. Now I updated it with

sudo apt-get update && sudo apt-get upgrade

I guess, I should just change the path to the new one and include the public/private keys and the wallet.dat into the new folder
Is that correct? Will you give me a hint, how can I check the current path and update it?

Any installation of zcashd will use the same data directory by default. On Linux that’s ~/.zcashd so there is nothing to do. Assuming it updated correctly i.e. run zcashd --version then you are all set.