I tried to install asitop through brew but it doesn't exist (yet) as a package (see comments).

The tentative installation triggered an update of the existing brew packages. From then on, each time I invoke a brew command I get the following (even when issuing a brew doctor command):

/usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `split': invalid byte sequence in UTF-8 (ArgumentError)
    from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `block in parse'
    from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `each'
    from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `flat_map'
    from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `parse'
    from /usr/local/Homebrew/Library/Homebrew/PATH.rb:25:in `initialize'
    from /usr/local/Homebrew/Library/Homebrew/global.rb:124:in `new'
    from /usr/local/Homebrew/Library/Homebrew/global.rb:124:in `<top (required)>'
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `require_relative'
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `<main>'

echo $PATH renders the following:


I stumbled on this stackoverflow thread, but unfortunately I failed to generalise the solution to my case.

Kindly note that I have istats installed (see this thread for installation procedure).

Can someone please help me to solve this problem?

  • There's no such package asitop in the main Homebrew repo. Have you installed it from a 3rd party repo? You'll also have to elaborate on why the installation of istats is relevant. Aug 25, 2022 at 14:46
  • @AndyGriffiths: Thanks for your comment. Just checked and you're correct. I guess that what I thought being the installation of asitop, was the Running `brew update --auto-update`.... Also I specified that istats is installed because it's intallation affected the result of the echo $PATH command (I thought it might be relevant at some point).
    – pdeli
    Aug 25, 2022 at 14:58
  • Please edit your question to focus on the actual problem, details in comments easily get lost.
    – nohillside
    Aug 25, 2022 at 21:55
  • Also, what is the ? doing at the beginning of PATH?
    – nohillside
    Aug 25, 2022 at 21:56
  • @nohillside. Thanks for your comments. I have no idea why there is a ? at the beginning of the result of echo $PATH. I only pasted the result of the command. Should I remove it? If yes, how?
    – pdeli
    Aug 26, 2022 at 11:05

1 Answer 1


There is a ? at the beginning of your PATH which for sure should not be there. If it persists (open a new Terminal tab to verify), you need to look through the startup files of your shell and into /etc/paths//etc/paths.d/* to check where it gets added.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .