Quote:
I have got a major debian apt problem that has got me stumped.
I'm *not* an expert but I do use Debian; mainly testing though. Anyway, lets see...
Quote:
The apt database on one of my sarge debian servers has recently become messed up in such a way that php and a number of other important packages are not installed and cannot be reinstalled. It appears that some packages think that they should be installing etch versions rather than sarge. I did at one point in the distant past add testing to my sources list while trying to install a more recent version of something like hddtemp. My sources file has only stable in it since.
If you add testing or similar to your sources then you may want:
# cat /etc/apt/apt.conf.d/10local
APT::Default-Release "stable";
[ah, yes, you've got that]
Hmm, now etch is stable I wonder if that should be sarge?
Quote:
This all started when I did an "aptitude update", saw the was a new version of squirrelmail available and did a "aptitude upgrade". It wouldn't upgrade squirrelmail because of held back packages.
IIRC upgrade is basically a request to upgrade all packages in the OS to the latest version. If you had testing in your sources and no 'pinning' (to pin the version to stable) then you *may* have upgraded to testing...
Quote:
At some point during this problem I had lots of packages in a held state, I did a "dist-upgrade" to try and clear them as that seemed to be the advice I googled.
I'm pretty sure that that will have forced an upgrade. I don't think you're in Kansas^H^H^H^H^HSarge any more Toto 
Quote:
I then removed some packages including php to try and reinstall them, but that has just made things worse.
Especially if some packages come from a repository that you've told the packager to forget about...
Quote:
For example when I try to do "aptitude install php4" I get:
[Paraphrased *HELP - I'm BROKEN*]
Quote:
I also tried various apt-get and aptitude commands to try and purge the package meta data for the problem packages, but that didn't seem to achieve anything.
Does anyone have any advice on how to fix this ? I have tried googling, but not come up with anything helpful.
I am wondering whether at this stage upgrading the machine to etch might be the way forward ?
I think this is your best bet.
If you want to try something first then add:
deb http://ftp.uk.debian.org/debian etch main contrib
to sources, do an apt-get update
Then go into aptitude and try to upgrade squirrel etc.
Then press 'b' to find the next broken package. Then hit return to get to the package details. You may then see a more advanced version at the very bottom that you can select and do a 'u' on manually. This overrides the pinning.
'q' to get back to the main list and then keep doing this for all broken packages.
Quote:
This sort of problem is exactly the sort of thing that I expect to happen on Windows, not debian
Ironically I used (and still use on an old server) rpm for years without anything like this happening.
I _suspect_ it's because you did things with a mixed repository (testing/stable) and then did some upgrade/dist-upgrade stuff.
There is plenty of rope in the Debian world... 
Quote:
All my apt config files and log files are available here http://www.norman.cx/download/vault/
Thanks
_________________________
LittleBlueThing
Running twin 30's