Sample Header Ad - 728x90

Homebrew unavailable on Ubuntu when connecting via ssh (PATH doesn't include brew location)

2 votes
1 answer
521 views
I am connecting with ssh from a Mac to a Ubuntu machine with Homebrew installed (as per [these](https://docs.brew.sh/Homebrew-on-Linux) instructions). When using the Ubuntu machine directly, brew works fine. But with ssh, I get the the message zsh: command not found: brew. I am using zsh with oh-my-zsh on both machines. The PATH variable when I connect using ssh is not the same (doesn't have many of the locations, including the one for brew) as when I'm using the machine directly. I suspect the problem may be the one mentioned [here](https://unix.stackexchange.com/questions/543157/brew-is-not-found-when-i-sshpass-to-the-server) , but I couldn't quite figure out what the solution is. Would be of very useful to know how to get the same path as on the machine when connecting via ssh. Thanks.
Asked by Py_Dream (151 rep)
Feb 11, 2022, 04:06 PM
Last activity: Jun 13, 2024, 09:37 AM