I installed openvpn with brew. The installation went fine, no errors or missing dependencies. But now when I try to run it:
users-MBP:~ user$ brew install openvpn
Warning: openvpn-2.3.7 already installed
users-MBP:~ user$ openvpn
-bash: openvpn: command not found
Solution:
At the terminal type:
echo $PATH
That’s your default search path for executables. Looks like the OpenVPN executable was installed someplace not in your search path.
First, you’ll need to find the OpenVPN executable:
sudo find / -type f -name "openvpn"
Then add the directory containing the OpenVPN executable to your default search path by adding this sort of line to the end of your .profile (in your home directory, a.k.a. /Users/yourusername/.profile:
export PATH="/some/brew/dir:$PATH"
OR
- Installation using homebrew
brew install openvpn
- Information regarding binaries
brew info openvpn
- It gave me the installation path as:
/usr/local/Cellar/openvpn/2.4.0
- Then I browsed for
bindirectory but found executable insidesbin. So, I added the following line
export PATH=$PATH:/usr/local/Cellar/openvpn/2.4.0/sbin