0

I recently have uninstalled Homebrew, as I don't need it anymore, which I previously have installed Github CLI through. I am using WSL2 to re-install Github CLI using the official provided script.

I get no error messages during installation process, however, when I go to use the gh command, I get the following error:

Terminal output error

It says it can't find it, where which gh clearly shows it is installed on my system, plus the linuxbrew folder doesn't exist anymore.

Any help to solve this issue would be appreciated!

EDIT: Every time I start a new terminal session, this also happens, if it helps debugging my issue.

enter image description here

spenpal
  • 106
  • 6
  • It looks like linuxbrew added a symlink which is now broken. You can check with `file -h /usr/bin/gh`. If it's a broken symlink, you can safely `unlink` it and try installing `gh` again. – Zac Anger Dec 25 '22 at 04:21
  • Are you sure that uninstalling Homebrew (linuxbrew?) should have left you with working installations of programs you have installed with it? – Nikolaj Š. Dec 25 '22 at 04:33
  • Nvm, I found the culprit. This line was located in my `~/.profile` file: `eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)`. I just commented it out, and now the `gh` command is working fine, based off the `usr/bin/gh` location. – spenpal Dec 25 '22 at 04:36

0 Answers0