To resolve missing path, or “zsh: command not found: tailpress” error or any such command not found error message in macOS Monterey or later, following steps can fix the issue.
For adding the variables to the path you need to add it to zshrc file for making that variable available locally.
The way you have used will only work until you use it in the same terminal window path only.
To solve the problem, follow these steps:
- Goto you home directory
- Simultaneously press cmd + shift + (.) Note:the last key is the key of dot
- On following step 2, new hidden files will appear in home directory, look for (.zshrc) file and open it using any text editor.
Add your path variable in it, save and then close it. - Example: export PATH=”/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin”, Example 2: export PATH=”$HOME/.composer/vendor/bin:$PATH”, Example 3: export PATH=”$HOME/flutter/bin:$PATH”
- Open terminal and run the command: “echo $PATH” and see if your added variable is present in the output shown by terminal.
If yes, You are now ready to go to use it from anywhere in terminal now.