No brew services on Mojave

  • macOS version:10.14.6 (Mojave)
    After: brew tap homebrew/services and then
    brew services start mysql
    I got:
    Error: Unknown command: services
    How I can fix that? If you want more info please let me know.
1 Like

Type brew commands and look what do you have in External commands.

I don’t have such section:
https://hastebin.com/curejonowi.coffeescript

Well, that’s strange. Did you tried run brew doctor --verbose?

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshr

Here is what I did:
https://hastebin.com/mivovahusi.sql
Still no external commands in brew commands

Let me guess… You didn’t added Homebrew completions in $fpath?
Add to your zshrc:

if [[ -n "/usr/local" ]]; then
    FPATH=/usr/local/share/zsh/site-functions:$FPATH
fi
➜  ~ tail -n 5 .zshrc
export PATH="/usr/local/sbin:$PATH"
if [[ -n "/usr/local" ]]; then
    FPATH=/usr/local/share/zsh/site-functions:$FPATH
fi

➜  ~ source .zshrc
➜  ~ brew services start mariadb
Error: Unknown command: services

Still no luck. Maybe I should reinstall homebrew?

try this?

1 Like