Author Topic: PHP-FPM Won't install zlib says missing dependency zlib-dir  (Read 58 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
PHP-FPM Won't install zlib says missing dependency zlib-dir
« on: August 16, 2026, 06:51:18 PM »
When trying to compile PHP 8.4.x PHP FPM custom selector throws error saying "zlib-dir" is a dependency of zlib which in 8.4.x zlib-dir or zlib-develop is baked into PHP version 8.4.x to my knowledge. This missing dependency doesn't allow PHP-FPM to be compiled with custom settings because of the missing zlib-dir dependency.

From what I can tell from research is that zlib-dir is no longer needed in PHP8.4.x and should not be throwing the error. Compiling without zlib does not allow gzip page compression, so this is a deal breaker.

Offline
***
Re: PHP-FPM Won't install zlib says missing dependency zlib-dir
« Reply #1 on: August 16, 2026, 09:32:39 PM »
Zlib support in PHP just is not enabled by default.
If you want use it, you will need to configure PHP --with-zlib[=DIR], it's a requirement.
See: https://www.php.net/manual/en/zlib.installation.php

So, check if your compilation is enabling zlib in config.log, if that file have --with-zlib parameter:
# grep zlib /path/to/your/configure/config.log

Regards,
Netino

Offline
*****
Re: PHP-FPM Won't install zlib says missing dependency zlib-dir
« Reply #2 on: August 16, 2026, 11:20:07 PM »
I think CWP posted the fix for this.

But with everyone starting new threads in all different areas, about the same PHP issues, it's hard to keep track anymore.

You'll have to look thru the past couple days of posts about PHP, CWP side banner to the left is hard to miss.