"kept back" generally means "I would upgrade them, but upgrading them requires me to do some other action I don't want to perform". Its unfortunately silent about what that "some other action" is. Often it is adding or removing some other package. dist-upgrade
(which will readily install new packages or remove other packages in order to perform an upgrade) will less often have this problem. Though this type of thing generally shouldn't happen on a stable release. If dist-upgrade is also unwilling to do this, there must be some bigger problem.
Its never a bad idea to first make sure that there aren't some pending actions that should first be performed, or other broken packages. So I recommend:
apt-get --fix-missing install
The way to find out what needs to happen is to tell apt to explicitly upgrade the packages. You might do this:
apt-get install libapache2-mod-php5 php5 php5-cgi php5-cli php5-common php5-curl php5-gd php5-imap php5-mysql php5-sqlite php5-xsl
Another option is to try aptitude by using aptitude full-upgrade
. As aptitude is generally willing to work a little hard to solve a dependency problem, and is willing to present you with multiple ways to solve a dependency problem. (If it says "Accept this solution?" you can say "No" to try another solution).
This might just work, it might also just complain about some other packages being kept back, in which case, you can try installing those, and recurse like this until you ultimately find and/or solve the dependency problem.
HOWEVER, the bad news is that even if you fix this dependency problem, this should NOT get you to 5.3, as the version of php in 8.04 (hardy) is 5.2.4-2ubuntu5.19 as can be seen here. This is to be expected since the 8.04 version number of your Ubuntu indicates it was released in April 2008, and at that time PHP 5.3.0 hadn't yet been released.
If you check apt-cache policy php5
, You shouldn't see any version of php other than 5.2.4-* listed. If you do, then someone has already tried to wedge a different version of php in here, which would not be a recommended way to solve this.
If you really need php 5.3, my recommendation would be to upgrade to a newer version of ubuntu. You may find a third party repository that has 5.3 compiled for hardy, but I would be suspect of the quality and the timelyness of security patches (especially with something with as many regularly found security problems as php) when using a third party repository.