3

We are currently receiving these kind of error messages when updating our tezos node.

Our upgrading procedure are like this: 1. We copy the main ~/tezos directory to a new directory called ~/tezos-new. 2. Call update command as shown below. 3. Stop node, change directory names, and start node again.

Using this command:

cd ~/tezos-new && eval $(opam env) && make clean && git checkout mainnet && git pull && make clean && make build-deps && eval $(opam env) && make && cd ~

We get errors like this:

[ERROR] No switch is currently set. Please use 'opam switch' to set or install a switch
make: dune: Command not found
Makefile:118: recipe for target 'clean' failed
make: [clean] Error 127 (ignored)
make[1]: Entering directory '/home/tezos/tezos-new/docs'
make[1]: Leaving directory '/home/tezos/tezos-new/docs'
Already on 'mainnet'
Your branch is up to date with 'origin/mainnet'.
Already up to date.
[ERROR] No switch is currently set. Please use 'opam switch' to set or install a switch
make: dune: Command not found
Makefile:118: recipe for target 'clean' failed
make: [clean] Error 127 (ignored)
make[1]: Entering directory '/home/tezos/tezos-new/docs'
make[1]: Leaving directory '/home/tezos/tezos-new/docs'
[ERROR] No switch is currently set. Please use 'opam switch' to set or install a switch
[tezos] Initialised

Any insight is much appreciated.

In the end the node is updated, and is running latest block and everything. Just wanted to get more insight into this message. Thanks.

4
  • I think you should run opam init first in the new directory to initialize opam env and that will also set opam switch Commented Sep 10, 2019 at 11:21
  • Then it ask me to modify "~/.profile" so that eval$(opam env) isn't required every time I want access the opam installation. Saying yes to this still gives me the switch error message at the beginning. But thanks for the feedback.
    – Vindberg
    Commented Sep 10, 2019 at 13:35
  • Did you copy ~/tezos to ~/tezos-new without cleaning-up the build-artifacts? If there is an _opam subdirectory in ~/tezos and you try to copy it to ~/tezos-new you may confuse opam (because the _opam directories are not relocatable).
    – Seb Mondet
    Commented Sep 12, 2019 at 17:38
  • Yes that must be it. Thanks for the advice.
    – Vindberg
    Commented Sep 26, 2019 at 8:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.