You may face “wget command not found” through Terminal under MacOS because All MacOS Versions are contributed with curl (a network transfer tool) by default. However, take the following methods to install properly wget into MacOS without SSL GNUTLS error.
Method 1 - Install wget through Homebrew
If Homebrew has not been installed into your MacOS yet, Enter the following command line through Terminal (Found under /Application/Utilities/) to install Homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
And then install wget with brew and also enable openressl for TLS support
brew install wget --with-libressl
If you are installing with Macports, this is pretty easy too.
sudo port install wget
Method 2 - Install wget: Get Xcode --> Using curl to get wget --> Configure and Install
Step 1: Get Xcode
Download latest Xcode from here: https://itunes.apple.com/au/app/xcode/id497799835?mt=12
Enter the following command line to install Xcode command line tools through Terminal.
Step 2: Use Curl to download wget
- From terminal windows, enter the following command lines:
curl -O https://ftp.gnu.org/gnu/wget/wget-1.19.5.tar.gz
tar -zxvf wget-1.19.5.tar.gz
- Configure and Install:
an error may occur on SSL… due to SSL support GNUTLS is not available on MacOS.
configure: error: --with-ssl was given, but GNUTLS is not available.
- Fix SSL support GNUTLS error:
sudo make install
wget will be installed in:
- You may need to remove wget installer by the following command:
m -rf ~/Downloads/wget*