re-installation on two osx systems using macports needed a hack
This concerns the "curl" command prominent on https://www.haskell.org/ghcup/ when run on two mac systems: Mac OS X 10.11.6 and 10.13.6
In both cases, this failed with : Reason: Incompatible library version: ghcup requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0 It turns out it was looking for this (non-existent) library. dyld: Library not loaded: /usr/local/opt/xz/lib/liblzma.5.dylib (Perhaps the error message was a little misleading: it couldn't actually find the library, so version 6.0.0 wasn't provided.)
(The problem was slightly different on my older system, where things stopped working when I upgraded ghcup. The same hack below got things working again.)
I was able to hack around the problem by creating the necessary subdirectories opt/xz/lib and symlinking the sought-for path name to /opt/local/lib/liblzma.5.dylib, which does exist on both my systems. Those dylibs were installed (long ago) via the macports package "xz".
I have no idea how the problem should be properly fixed. I guess it arose for me because I use macports rather than brew.