Reputation: 37
every time I type ghci into the terminal or a command I would execute through ghci it tells me zsh: command not found: ghci
.
I'm super new to this and don't really know what to do?
Commands like cd and so on that are for the items on my Mac work just fine.
Upvotes: 2
Views: 4183
Reputation: 21
Here's the GUI version of it.
Open Ghcup GUI with the command
ghcup tui
You would notice something like this
GCHUP GUI:
For me when the ghc
or ghci
command was not working, there was a single tick beside GHC option.
Go to that option and press s to set. It worked for me.
Upvotes: 1
Reputation: 57
You could try wirte . ~/.ghcup/env in the ~/.zshrc file. Another thing is restarting the terminal.
Upvotes: 0
Reputation: 48662
It sounds like bash
was your shell when you installed GHC, but Apple later switched you to zsh
. The problem is that it was only added to your path for bash
. Look for a line in ~./bashrc
or ~/.bash_profile
that looks something like this:
[ -f "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}/.ghcup/env" ] && source "${GHCUP_INSTALL_BASE_PREFIX:=$HOME}/.ghcup/env"
It might not look quite like that, but the important part is the reference to .ghcup/env
. Once you find that line, copy it and add it to the end of ~/.zshrc
. Then restart your shell and try again.
Upvotes: 2