Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aachyee/f42c765bcbeade506107457a11c685b3 to your computer and use it in GitHub Desktop.

Select an option

Save aachyee/f42c765bcbeade506107457a11c685b3 to your computer and use it in GitHub Desktop.
Build wget2 with all features on clean Ubuntu 20.04 installation
sudo apt-get -y install gcc g++ make cmake doxygen pandoc awk sed perl python3 python-is-python3 m4 bison flex lzip lcov git zlib1g-dev libssl-dev libnghttp2-dev autoconf autoconf-archive autogen automake autopoint libtool pkg-config texinfo nettle-dev libunistring-dev gettext make libbz2-dev libbrotli-dev libzstd-dev liblz-dev libpcre2-dev libmicrohttpd-dev libgpgme-dev liblzma-dev libgnutls28-dev libgcrypt20-dev git-merge-changelog libidn2-0 libpsl-dev # libpcre3-dev nettle-bin lzma brotli zstd lzip
cd ~/Downloads
mkdir wget-dev
cd wget-dev
git clone https://gitlab.com/rockdaboot/libhsts
cd libhsts
autoreconf -fi
./configure
make
make check
sudo make install
cd ..
git clone https://github.com/rockdaboot/libpsl
cd libpsl
./autogen.sh
./configure --disable-dependency-tracking
make
make check
sudo make install
cd ..
git clone https://gitlab.com/gnuwget/wget2.git
cd wget2
./bootstrap
./configure
make
make check
sudo make install
cd ~
wget2 --help
@Depixelate

Copy link
Copy Markdown

Some problems I have run into while using this very helpful script, and suggested solutions:

  1. awk is already installed on my system as gawk(but I'm running mint 21, so it might be slightly different than on ubuntu), and when the apt-get command, it complains that awk is a virtual package, and quits. This could be fixed by either removing awk or just replacing it with a non-virtual package like gawk.
  2. There isn't any need to compile libpsl from source, libpsl5 is available on apt.
  3. In the newest version(s) of wget2, lzma and bzip2 aren't included by default, you have to manually enable them by running ./configure --with-lzma --with-bzip2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment