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.

Is there a way to install an older Debian testing repository version of a package using apt-get?

Specifically, I am looking to install the latest version of PHP 5.2.x on Debian Lenny.

The last time I set up an environment, 5.2.12 just happened to be the version in Debian testing. That was perfect, convenient. Now, testing is at 5.3.x which won't work for my purposes, and my attempts at sudo apt-get -t testing install php5=5.2.12* are answered with E: Version '5.2.12*' for 'php5' was not found.

share|improve this question

3 Answers 3

apt-get is made to register only one version of a package for a release/architecture. You cannot get the package via apt-get if it's been replaced in the repository.

It's also likely that the previous version was purged from the repository, unless it is still referred to by another release (which I don't think it's the case here).

You don't have it in your cache either, otherwise you would be able to install it.

You could still try to find it on http://snapshot.debian.net.

If you still fail to find it, we can arrange something if you need it packaged, contact me.

share|improve this answer

I cannot find php5.2.13 ( the current latest php 5.2.x ) in any standard repository but dotdeb.org contains php 5.2.13 for Lenny.

Assuming you know how to enable third party repositories the lines you need are

deb http://dotdeb.mirror.somersettechsolutions.co.uk/ stable all
deb-src http://dotdeb.mirror.somersettechsolutions.co.uk/ stable all

for the UK mirrors. Other mirrors are available.

Check out the mirror list for other countries.

You can then do

apt-get update
apt-get install php5_5.2.13-0

I have never used this repository and you need to make your own decisions regarding the security implications of using third party repositories.

share|improve this answer
    
Thanks, but I haven't had luck with dotdeb in the past. I guess my question could be rephrased "where's the Debian testing repository PHP 5.2.12 I installed just a month or two ago?" or "are testing packages completely deleted when newer versions are released (and if so, why -- isn't being able to rollback an important part of testing)?" –  Metric Scantlings Apr 14 '10 at 17:30
    
The 5.2.x version was replaced by 5.3.x. You are right in what you say about rollback and testing but I think the "testing" label is for developers testing not sysadmins testing. –  Richard Holloway Apr 15 '10 at 12:35
    
Metric, did you find a solution to installing this version of php? –  Richard Holloway Aug 13 '10 at 23:36

You might also look at /var/cache/apt/archives if you haven't done an apt-get clean and upgraded to get 5.3.

It is a shame Debian pushed 5.3 before Zend could upgrade Zend Optimizer to work with 5.3 as it has left a lot of our systems stuck as well. We have a local repository that allows us to pin 5.2.13 to avoid the problem, but, Zend really is to blame on the current situation.

share|improve this answer

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.