macos install wget refers to adding the GNU Wget HTTP/HTTPS/FTP download utility to macOS via Homebrew, MacPorts, or manual compilation from source.
brew install wget [--with-libressl] [--HEAD]
Syntax
# Homebrew (recommended)
brew install wget [--with-libressl] [--HEAD]
# MacPorts
sudo port install wget
# Compile from source
curl -O http://ftp.gnu.org/gnu/wget/wget-1.21.4.tar.gz
tar -xzf wget-1.21.4.tar.gz
cd wget-1.21.4
./configure --with-ssl=openssl
make
sudo make install
Options and Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--with-libressl |
brew option | N/A | Link against LibreSSL instead of OpenSSL (Homebrew only; deprecated in recent versions). |
--with-ssl=openssl |
configure flag | auto | Force use of OpenSSL for SSL/TLS support. |
--HEAD |
brew option | N/A | Install from the latest development commit (unstable). |
--with-libssl-prefix |
configure flag | system | Specify custom path to OpenSSL libraries when compiling. |
-O |
wget runtime flag | N/A | Output downloaded file with the same name as the remote file. |
-a |
wget runtime flag | N/A | Append output to log file. |
-c |
wget runtime flag | N/A | Resume interrupted download. |
-p |
wget runtime flag | N/A | Download all page assets (page requisites). |
-s |
wget runtime flag | N/A | Show server response headers. |
Usage Examples
1. Homebrew – Quick Install
brew install wget
Installs the latest stable bottle (pre‑compiled binary) for your macOS version. Homebrew resolves dependencies (e.g., OpenSSL, zlib) automatically.
2. Compile with Custom OpenSSL Path
./configure --with-libssl-prefix=/usr/local/ssl --with-ssl=openssl
make
sudo make install
Use when a specific OpenSSL version is required (e.g., FIPS‑compliant). Common in enterprise environments.
3. Install Development Branch with LibreSSL
brew install wget --HEAD --with-libressl
Pulls the latest Git commit and compiles against LibreSSL. Note: --with-libressl may be ignored in newer Homebrew versions.
4. Resume and Download Page Assets
wget -c -p https://example.com/largefile.iso
wget -s https://example.com
-c resumes partial transfers; -p fetches all assets; -s shows server headers.
Troubleshooting & Common Errors
| Error Message | Root Cause | Resolution Command |
|---|---|---|
Warning: wget: this formula has no --with-libressl option so it will be ignored! |
Homebrew deprecated the option. | Remove the flag: brew install wget |
Error: wget-1.19.1 already installed, it's just not linked |
Another version is installed but not symlinked. | brew link --overwrite wget |
configure: error: --with-ssl=openssl was given, but SSL is not available |
OpenSSL headers not installed. | brew install openssl then re‑configure with --with-libssl-prefix=$(brew --prefix openssl) |
Error: Failed to download resource "wget" |
Network issue or Homebrew core outdated. | brew update then retry |
Frequently Asked Questions
What is the difference between installing wget via Homebrew and MacPorts on macOS?
Answer: Homebrew installs to /usr/local, MacPorts to /opt/local. Homebrew is faster due to binary caching. MacPorts offers stricter dependency management.
brew install wget
sudo port install wget
When should I use the –with-ssl flag during the Homebrew wget installation?
Answer: Use --with-ssl=openssl to explicitly link wget against OpenSSL. By default, Homebrew wget uses its own OpenSSL. To switch to LibreSSL (deprecated): brew install wget --with-libressl. Verify SSL backend with wget --version | grep SSL.
Does wget installed via Homebrew work on Apple Silicon (M1/M2/M3) and Intel?
Answer: Yes. On Apple Silicon, Homebrew installs in /opt/homebrew. Verify binary architecture with file $(which wget).
What is the fastest way to install wget on macOS?
Answer: Use Homebrew: brew install wget. First install Homebrew if missing: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)".

Command Line Expert & Software Engineer
Welcome! I’m Thomas Heinrich, a software engineer and system administrator with a deep passion for the Command Line Interface (CLI). With years of experience navigating the terminal, building backend architectures, and automating server deployments, I created this space to share practical, real-world terminal knowledge.
Whether you are a beginner taking your first steps in a Linux environment or a seasoned DevOps engineer looking to optimize your deployment scripts, you will find actionable solutions here. My goal is to help you ditch the mouse, speed up your workflow, and harness the full power of the command line.