It is your responsibility to find out why certain packages may not be installed on your system, as it may be due to conflicts with existing packages on your system that may prevent them from being installed.
The packages I mentioned are required if you need to compile anything related to Apache modules. You do not need them only if you are sure you have compiled and installed Apache from sources, and thus they are present although no binary package installed.
If you have such a broken system that would cost you a lot of time to fix to restore to working state, you may consider installing your self-compiled PHP as a CGI binary. That is not good in terms of performance (so refrain from doing so on a production machine), but you can be off the hassle associated with compiling Apache modules.
PHP: CGI and command line setups - Manual