Skip to content

Instantly share code, notes, and snippets.

@bhpayne
Created June 1, 2025 18:28
Show Gist options
  • Save bhpayne/9fb4cecc698fbc4bcac0d5a512738ac7 to your computer and use it in GitHub Desktop.
Save bhpayne/9fb4cecc698fbc4bcac0d5a512738ac7 to your computer and use it in GitHub Desktop.
wget installation on mac

As of 2025-06-01

$ openssl version
LibreSSL 3.3.6
$ which openssl
/usr/bin/openssl

macOS ships with LibreSSL, not the "standard" OpenSSL from openssl.org. While LibreSSL is a fork and aims to be API-compatible, build scripts (like wget2's configure) often specifically look for files and structures associated with the original OpenSSL, and they might not find what they need in the standard macOS system paths for LibreSSL's development headers and libraries.

Find latest version of openssl on https://github.com/openssl/openssl/releases

curl -O https://github.com/openssl/openssl/releases/download/openssl-3.5.0/openssl-3.5.0.tar.gz
tar zxvf openssl-3.5.0.tar.gz
cd openssl-3.5.0
./Configure darwin64-arm64-cc --prefix=/usr/local --shared zlib no-ssl2 no-ssl3
make
make test
sudo make install

find latest version of wget on https://ftp.gnu.org/gnu/wget/?C=M;O=A

$ curl -O https://ftp.gnu.org/gnu/wget/wget2-2.2.0.tar.gz
$ tar xzvf wget2-2.2.0.tar.gz
$ cd wget2-2.2.0
$ ./configure --with-ssl=openssl

but an error occurs,

wget.c:70:11: fatal error: 'pcre2.h' file not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment