I asked this on stackoverflow, but I think it was the wrong audience/forum

Recently installed php5.3.22 on Ubuntu 12.04 from an excellent install script. This works perfectly.

The issue I have is that I now want to also install phpunit. When i try apt-get install phpunit - It wants to also include a bunch of dependencies such as php5-common, etc. (I suspect apt-get does not already know that I have php5.3.22 installed and wants to install php5.x.x - since it is the distro release version.)

I do not want to conflict/overwrite my (already tuned) php5.3.22 install.

I thought about using a php phar file to run php unit. but first want to know if anyone knows simple step by step instructions to inform apt-get about the existing php5.3.22 install so that I can use apt-get in the future to configure php for upgrades, add modules, etc.

There are many questions about installing older versions of software on Ubuntu, but I am looking specifically to inform the package management system about which is the installed current version.

  • You installed PHP from source code. The package manager will never know about this. Mar 8, 2013 at 22:50

2 Answers 2


You use equivs to inform the package management system that you've installed software through other means. See, e.g., http://blog.andrewbeacock.com/2005/09/creating-dummy-debian-package-for.html

Edited to add: 12.04 comes with php5.3, not 5.4 so I don't know why you think that...


If PHP hasn't been installed from a Debian package (which that script doesn't do), then apt-get cannot know about it. By eschewing the Debian package management you're on your own now, and you'll probably have to manually compile and install everything PHP related. This is why it's strongly recommended to stick to the Debian provided packages, and if that isn't doable for a really good reason, to build your own packages. Have fun.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .