To install wget on macOS, you will need to have root privileges or access to a user with sudo privileges.
xcode-select --version
If the command-line tools are not installed, you can install them by running the following command:
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install wget
wget URL
Replace "URL" with the URL of the file that you want to download.
That's it! Wget should now be installed on your macOS system. You can use it to download files from the Internet.
Note: If you prefer, you can install wget using the "curl" command instead of Homebrew. To do this, run the following command:
curl -O URL
Replace "URL" with the URL of the wget binary. This will download the wget binary and save it to the current directory. You can then make the binary executable and move it to a directory in your PATH, such as /usr/local/bin. For example:
chmod +x wget sudo mv wget /usr/local/bin
This will allow you to run wget from any directory.