Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've a locally compiled version of apache, which in the control file has

Replaces: apache2, apache2-mpm, httpd, httpd-cgi, apache2-mpm-prefork, apache2-utils, apache2-common, apache2.2-bin, apache2.2-common
Conflicts: apache2, apache2-mpm, httpd, httpd-cgi, apache2-mpm-prefork, apache2-utils, apache2-common, apache2.2-bin, apache2.2-common

However if I then do apt-get install php5, apt tries to remove my package and install the apache packages from the ubuntu repository.

I've tried swapping Replaces, Conflicts and Provides but can't seem to get it to keep my local package, the package is priority "optional" which is the same as apache2.

Does anyone know how I can configure my package to replace ubuntu's apache?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

This would be because the php5 package has a dependency (possibly indirect) that your packages don't satisfy. Try using aptitude instead of apt-get, perhaps passing it the option -v one or more times, so as to get a more detailed report of what the troublesome dependency chain is; or use aptitude interactively so as to be able to explore the dependency chain easily (request the installation of php5 and look at the conflict resolution proposals).

The easiest way of satisfying dependencies would be to use the Ubuntu compilation scripts for your own version of Apache, so as to have the same package names and greater version numbers, which should satisfy all dependencies.

If all else fails, you could use the equivs-build tool from the equivs package to build a trivial package to satisfy the missing dependencies.

share|improve this answer
    
That worked thanks, I used the ubuntu control file to compile my own with a higher version number as you suggested :) –  Rwky Oct 26 '10 at 1:48

Install your packages and mark them hold.

share|improve this answer
    
I've tried this but then aptitude asks me to resolve conflicts and apt-get just ignores it and tries to remove my apache –  Rwky Oct 25 '10 at 14:33
    
There is a dependency on libapache-mod-php5 among others. With your custom apache, you likely don't have this package. You can meet the dependency by installing php5-common. This may solve your problem. –  BillThor Oct 25 '10 at 21:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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