Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a dedicated server with Ubuntu 8.04, and really need to upgrade php to 5.3 version in order to deploy a new version of the system.

This version of php is the default one in ubuntu 10.04, so I considered upgrading the OS, but after trying that, I lost my plesk installation, which annoyed my client.

I tried adding the dotdeb.org repositories, but don't know why, after running an apt-get upgrade, I get this error:

# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  libapache2-mod-php5 php5 php5-cgi php5-cli php5-common php5-curl php5-gd php5-imap php5-mysql php5-sqlite php5-xsl
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

Any idea why is this happenning?

Or do you know any alternative method (except compiling my own binaries) to upgrade php or update ubuntu without loosing plesk?

Thanks!

share|improve this question
add comment

2 Answers 2

"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.

share|improve this answer
add comment

Try apt-get dist-upgrade. It shouldn't upgrade your distribution if you have "hardy" in you /etc/apt/sources.list, just the problematic packages.

share|improve this answer
    
It gives me the same error –  alcuadrado Aug 4 '10 at 18:24
    
Maybe there is "hold" on them. Can you provide result of this command: dpkg -l | egrep "libapache2-mod-php5|php5|php5-cgi|php5-cli|php5-common|php5-curl|php5-gd|php5-i‌​map|php5-mysql|php5-sqlite|php5-xsl" ? It'll show the state in which desired packages are. –  mkudlacek Aug 5 '10 at 6:50
    
Yes, plesk sets up some holds, so I finally backup and reinstall everything :) –  alcuadrado Aug 6 '10 at 5:01
    
if plesk is setting a hold on php5, i'd be worried, unless plesk is doing something to ensure that it is getting upgraded routinely by some other mechanism –  stew Feb 9 '12 at 21:06
add comment

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.