DEV Community

Discussion on: ⚙️ How to install Brotli module for Nginx on Ubuntu 20.04+

Collapse
 
odifyltsaeb profile image
Alan

Thanks a bunch! This worked fine, but not without few clithces (on ubuntu 20.04) in DO.
After cloning ngx_brotli, I had to go in the cloned folder and run git submodule update --init because without it I received an error when trying to build modules.

Then the path of modules was different for my install and was /usr/lib/nginx/modules (not /usr/share).

Collapse
 
koddr profile image
Vic Shóstak

Hi, Alan. Great addition to the article! 👍

Unfortunately, (in my practice) it was not necessary to do the actions you described.

Collapse
 
pepelsbey profile image
Vadim Makeev • Edited

I got the same error with exactly the same solution: to init submodules:

checking for getaddrinfo() ... found
configuring additional dynamic modules
adding module in ../ngx_brotli

./configure: error: Brotli library is missing from the /usr directory.

Please make sure that the git submodule has been checked out:

    cd ../ngx_brotli && git submodule update --init && cd /root/nginx-1.19.10
Enter fullscreen mode Exit fullscreen mode

Once I did that everything went well. It might be that in other tutorials they suggest cloning brotli with git clone --recursive command. Thank you for the article!