I've compiled LAMP from source on a Ubuntu VPS. I had to remove a previously installed version of Apache then I manually compiled all the packages, which seems to have worked up unto a point - however, when I try to run commands like "/etc/init.d/apache2 restart" I get the following error - No apache MPM package installed. I have installed mpm-prefork so I don't know why i'm getting this problem. My configure command is as follows:

./configure --enable-so --enable-modules=most --with-mpm=prefork

I have deliberately not used apt-get to install anything and want to avoid this if possible.

Anyone have any guidance on how to resolve this error? Thanks in advance


It is most likely that /etc/init.d/apache2 belongs to the Ubuntu package (check with "dpkg -S /etc/init.d/apache2") and it is of course not aware of your own setup of Apache.

Since you did not mention the --prefix= switch in your call to ./configure, I assume that your installation ("make install") of Apache ended up somewhere under /usr/local/ which is of course a location nowhere compatible with the Ubuntu Sys-V-Init script /etc/init.d/apache2.

Since all this stuff leaves me with the impression that you are not that familiar with Linux/Unix and especially Apache I would like to advise you to use the prepackaged versions of Apache, provided by your Distribution (Ubuntu) if you are planning to use this server in a production environment.

If you just plan on learning the internals of Apache, try to take a look inside /etc/init.d/apache2. It's just a shell script and maybe you can adopt the paths to fit you own installation.

  • Thanks for the reply Fladi. Yes, that all makes perfect sense. This is not a production server, it's a development server which i'm setting up as an exercise to help improve my understanding of linux and I also specifically need to configure PHP 5.1.6 with Apache2, which requires a manual setup as far as i can see. Running /usr/local/apache2/bin/apachectl restart works for me, thanks again – kenny99 Mar 9 '10 at 14:59

Have a Look at http://www.lamphowto.com/

They provide the complete tutorial for installing LAMP Server in a PC. Of course it would vary with distributions. But this will help you nevertheless

Your Answer

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