30th March 2003
That's easy! Just use:
apt-get install package
That's easy! Just use:
apt-get dist-upgrade
apt-cache search keyword
Why not apt-get search keyword?
Shut up, be happy. That's just how it is.
dpkg-reconfigure xserver-xfree86
Why not apt-get config xserver-xfree86, or at least apt-reconfigure?
Shut up, be happy. That's just how it is.
That's easy! Just add the following lines to /etc/apt/sources.list:
Then run apt-get update followed by apt-get package or apt-get dist-upgrade.deb http://http.us.debian.org/debian testing main contrib non-free deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free deb http://security.debian.org testing/updates main contrib non-free
That's easy! Just add the following line to /etc/apt/apt.conf.d/70debconf:
Don't forget the semi-colon or every single APT-related command you try to issue will fail with a nonsensical error message!APT::Default-Release "stable";
PHP4 is a server-side scripting language for building web applications; NetPBM is a set of conversion utilites and image manipulation programs for bitmap files. I don't have the slightest idea why installing the latter (apt-get install netpbm) should cause the former to be uninstalled (along with a lot of other stuff), but do you know what? That's just how it is. Shut up, be happy.
After PHP4 hs been removed by installing NetPBM, any attempt to reinstall it fails as follows:
# apt-get install php4 Reading Package Lists... Done Building Dependency Tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: Sorry, but the following packages have unmet dependencies: php4: Depends: libbz2-1.0 but it is not going to be installed Depends: libc6 (>= 2.2.4-4) but it is not going to be installed Depends: libdb2 (>= 2:2.7.7.0-7) but it is not going to be installed Depends: libexpat1 (>= 1.95.2-6) but it is not going to be installed Depends: libmm11 but it is not going to be installed Depends: libpam0g (>= 0.72-1) but it is not going to be installed Depends: libpcre3 but it is not going to be installed Depends: zlib1g (>= 1:1.1.4) but it is not going to be installed Depends: apache-common (>= 1.3.26) but it is not going to be installed Depends: fileutils (>= 4.0-5) E: Sorry, broken packages #
Why? That's just how it is, I guess.
One might think that apt-get dist-upgrade/stable would work, but no: the system informs you that you already have the most recent versions of all packages. (And I want to cry out, ``I know that, you moron. That's why I'm trying to downgrade to older versions.'')
However! Turns out that it's easy! Just create the file /etc/apt/preferences with the folllwing contents:
and run apt-get dist-upgrade.Package: * Pin: release a=stable Pin-Priority: 1001
It all seems so obvious now. It makes me feel ashamed that I didn't just guess that I had to create this brand new configuration file that I'd never needed before instead of editing either of the two I've already had to mess with.
Once you've done this, though, life is sweet. The upgrade process (really a downgrade) trundles merrily along, until -
error processing /hulk/archives/debian-3.0/cd2/pool/main/libp/libpaper/libpaperg_1.1.8_i386.deb (--unpack): trying to overwrite `/usr/lib/libpaper.so.1.1.2', which is also in package libpaper1
That's easy! Just use:
apt-get -f install apt-get dist-upgrade # again
Of course!
dpkg: error processing /hulk/archives/debian-3.0/cd2/pool/main/d/dpkg/dpkg_1.9.21_i386.deb (--unpack): trying to overwrite `/etc/dpkg/dselect.cfg', which is also in package dselect
Well, certainly not with apt-get -f install, anyway.
Try apt-get install dselect
Tread very carefully or you'll break the package-manager.
dpkg --force-depends -r dselect dpkg -i /where/ever/you/keep/packages/dpkg_1.9.21_i386.deb apt-get dist-upgrade # yet again(I learned this from a German posting.)
dpkg: error processing /hulk/archives/debian-3.0/cd2/pool/main/f/fileutils/fileutils_4.1-10_i386.deb (--unpack): trying to overwrite `/bin/chgrp', which is also in package coreutils
apt-get -f install appears to work for this one, but doesn't actually fix anything.
dpkg --force-depends -r fileutils dpkg -i --force-overwrite /where/ever/you/keep/packages/fileutils_4.1-10_i386.deb # ignore the 98 lines of warnings apt-get dist-upgrade # yet again ... again!(dpkg -i without the --force-overwrite option won't work this time.)
By careful trial and error on each one.
In short the answer was: Downgrades are not supported.
It sure beats the hell out of me.
Har har har.
Never, ever, ever, put testing in your sources.list. Never.
David Batley sent me this email, which contains what might just be a solution to Debian update problems. (I've not yet used it myself, so all disclaimers apply.)
Date: Sun, 15 Apr 2007 12:41:54 +0100
From: David Batley <D.J.Batley@exeter.ac.uk>
To: mike@miketaylor.org.uk
Subject: Apt-get hell - a better solution
Hello
The other day, when using apt-get, I got the dreaded error:
and came across this on your sitetrying to overwrite ..., which is also in package ...This was some help, but couldn't fix it for my rather odd case (an essential package with changed dependancies)http://www.miketaylor.org.uk/tech/wxinmfpl/debian.html#1.10After a lot of searching, I found this solution which always works! No messing around, just one command:
This sends --force-overwrite to the dpkg call, and so it overwrites stuff without complaining; but still lets apt handle all the dependency issues.apt-get install package-name -o DPkg::options::="--force-overwrite"You could also force all, and ignore pretty much any complaint - which may not always be a good idea:
apt-get install package-name -o DPkg::options::="--force-all"If it's not too much to ask, I thought maybe you'd like to update that page so others with the same issue could find the help more easily? It would be great if you could.
Yours
David