Skip to content

Instantly share code, notes, and snippets.

@boogah
Last active February 16, 2024 15:08
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save boogah/b485bd8a6333677f343e22b81278663d to your computer and use it in GitHub Desktop.
Save boogah/b485bd8a6333677f343e22b81278663d to your computer and use it in GitHub Desktop.

Installing h2load on Your Dev Machine

Included are the steps for macOS and Ubuntu/Debian. I didn't do Windows because I don't have or use Windows. 😕

Installing h2load on macOS

Note: These instructions require Homebrew and Homebrew Cask. If you're not using them already, you really should. They're great.

brew install nghttp2

Installing h2load on Ubuntu

Note: You need to do this as root. Using sudo -i should give you the privledges you need as long as the machine is yours.

Grab everything you need to build h2load.

apt install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev -y --force-yes
git clone https://github.com/nghttp2/nghttp2.git && cd nghttp2

Build nghttp2 with h2load.

autoreconf -i
automake
autoconf
./configure --enable-app
make
make install

Why wouldn't I just use apt install nghttp2?

The h2load binary doesn't ship in Ubuntu's nghttp2 package, so you have to build the h2load binary manually. If you follow the instructions above, it should go without a hitch.

@emanweb
Copy link

emanweb commented Mar 25, 2017

I am using Ubuntu 14.04 and had to add --force-yes in order to work

apt install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev -y --force-yes

@lycandroid
Copy link

./configure --enable-apps

should be:

./configure --enable-app

@boogah
Copy link
Author

boogah commented Jan 2, 2018

Thanks for the notes @emanweb & @lycandroid. Fixed the instructions!

@fhoner
Copy link

fhoner commented Mar 17, 2018

I had to add missing dependency libc-ares on Ubuntu
apt install libc-ares-dev

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