[SOLVED] OPAM External solver failure

I keep getting the following error when trying to do an opam upgrade:


[WARNING] External solver failed:
# opam-version 1.2.2
# os           darwin
# command      aspcud /Users/basus/.opam/log/solver-in-91011-4bcc67 /Users/basus/.opam/log/solver-out-91011-dd682e -count(down),-count(removed),-notuptodate(solution),-sum(solution,version-lag),-count(new)
# path         /Users/basus/src/conveyances
# exit-code    1
# env-file     /Users/basus/.opam/log/log-91011-ccabea.env
# stdout-file  /Users/basus/.opam/log/log-91011-ccabea.out
# stderr-file  /Users/basus/.opam/log/log-91011-ccabea.err
### stderr ###
# ERROR: grounder returned with non-zero exit status

[ERROR] External solver failure, please fix your installation and check /Users/basus/.opam/config and variable $OPAMEXTERNALSOLVER.

The .out file is empty and the corresponding .err file simply says : ERROR: grounder returned with non-zero exit status. Even trying to reinstall the switch does not help. I’m running OPAM 1.2.2 on macOS High Sierra.

Solved here, for reference