Johnson44uuu wrote:
Also, i tried booting into safe mode, same issue happens as well
Testing in Safe Mode is always a good idea.
In this case, it is not surprising that the problem remains, because as far as we can tell this has something to do with the shell settings, like that PATH going through /opt/... first.
We need to determine how these go into your PATH.
There is another way to put directories in the PATH: via /etc/paths and /etc/paths.d
Let's see if that is where the homebrew thing gets there.
In Finder, press Command-Shift-G and paste
/etc
Locate the file named "paths" in this folder. Control-click and choose Open With->TextEdit.
Do not make any changes to this file. What does it contain?
In Finder, press Command-Shift-G and paste
/etc/paths.d
What files does this folder contain?
Trying to avoid a reinstall of the OS.