I'm trying to build apache with mod_deflate enabled. When restarting apache I'm presented with the following error:

httpd: Syntax error on line 36 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/mod_deflate.so into server: /usr/local/apache/modules/mod_deflate.so: cannot open shared object file: No such file or directory

How can I get mod_deflate.so?

2 Answers 2


It looks like you compiled Apache yourself, but you didn't choose to use the mod_deflate module. You'll need to recompile it, and this time enable mod_deflate.

./configure --enable-deflate ...the rest of your options...

I guess when you compiled apache you forgot to include mod_deflate. So if you decide to recompile everything again just add --enable-deflate.

Another option is compile the module as a dynamic shared object (DSO) in the current apache. Have a look at this blog post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.