So I have problem similar to this post:
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
If I call curl I get:
dyld[9668]: Library not loaded: /opt/local/lib/libz.1.dylib
Referenced from: <...> /opt/local/bin/curl
Reason: tried: '/opt/local/lib/libz.1.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libz.1.dylib' (no such file), '/opt/local/lib/libz.1.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
So curl is /opt/local/bin/curl
from what I read, it should not be there and in /opt/homebrew instead. I am not sure why it is not the case and how I should correctly repair it.
I tried brew update && brew upgrade
and considered tying uninstalling and reinstalling but curl problems made this hade.
Everything worked before and suddenly it is broken. I need help.
Can somebody help me diagnose and fix this problem?