Xandros and APT
Fixing broken dpkg or APT
Getting errors in APT or dkpg, saying things about a broken package? Try these steps:
First Things to Try
Run as root:
dpkg --configure -a
apt-get -f install
Overwrite Problems
Example (formatted for readability):
dpkg: error processing /var/cache/apt/archives/libcupsys2-dev_1.1.23-3_i386.deb
(--unpack): trying to overwrite `/usr/share/man/fr/man1/cups-config.1.gz',
which is also in package cupsys Errors were encountered while processing:
/var/cache/apt/archives/libcupsys2-dev_1.1.23-3_i386.deb
- Solution:
- Force the installation of that specific package.
dpkg -i --force-overwrite /var/cache/apt/archives/libcupsys2-dev_1.1.23-3_i386.deb
Removing Badly Broken Package
Do this only if other methods fail. If you are still stuck, you might be able to restore things with this command:
# dpkg --purge --force-remove-reinstreq <package name>
- Find every file that was installed, then do a search and destroy.
dpkg --listfiles <package name>
- Edit the file /var/lib/dpkg/status and remove the package and the 4 or 5 linees following in the section following your badly broken package
- Edit the file /var/lib/dpkg/available and remove the section for your badly broken package if it exists
- Try "apt-get check" and everything should be OK. If not, either try this again or you'll have to reinstall because there isn't much else to do beside trying to reinstall the .deb of the broken package or manually trying to solve dependancies
How to Pin your APT preferences SAFELY
Adapted from
XandrosForums : 708
More useful info on APT pinning:
How to review your current system policies and pinnings:
apt-cache policy
It should produce something like the following:
Package Files:
100 /var/lib/dpkg/status
release a=now
500 http://www.archlug.org xandros3/archlug Packages
release o=ArchLUG,a=archlug-xandros3.0,l=ArchLUG APT Repository for Xandros 3.0,c=main
origin www.archlug.org
500 http://xnv3.xandros.com unsupported3.0-xn/non-free Packages
release o=Debian,a=testing,l=Debian,c=non-free
origin xnv3.xandros.com
500 http://xnv3.xandros.com unsupported3.0-xn/contrib Packages
release o=Debian,a=testing,l=Debian,c=contrib
origin xnv3.xandros.com
500 http://xnv3.xandros.com unsupported3.0-xn/main Packages
release o=Debian,a=testing,l=Debian,c=main
origin xnv3.xandros.com
990 http://xnv3.xandros.com xandros3.0-xn/non-free Packages
release o=Xandros Corporation,a=xandros3.0-xn,l=Xandros Networks,c=non-free
origin xnv3.xandros.com
990 http://xnv3.xandros.com xandros3.0-xn/contrib Packages
release o=Xandros Corporation,a=xandros3.0-xn,l=Xandros Networks,c=contrib
origin xnv3.xandros.com
990 http://xnv3.xandros.com xandros3.0-xn/main Packages
release o=Xandros Corporation,a=xandros3.0-xn,l=Xandros Networks,c=main
origin xnv3.xandros.com
Pinned Packages:
The above has no /etc/apt/preferences file, and below is the /etc/apt/sources.list used.
deb http://xnv3.xandros.com/3.0/pkg xandros3.0-xn main contrib non-free
deb http://xnv3.xandros.com/3.0/pkg unsupported3.0-xn main contrib non-free
deb http://www.archlug.org/apt xandros3 archlug
If you set your preferences, set them to something like the following:
Package: *
Pin: origin
Pin-Priority: 999
Package: *
Pin: origin xnv3.xandros.com
Pin-Priority: 900
Package: *
Pin: release a=dccri-3.0
Pin-Priority: 800
Package: *
Pin: release a=stable
Pin-Priority: 777
Package: *
Pin: release a=testing
Pin-Priority: 666
Package: *
Pin: release a=unstable
Pin-Priority: 555
Back to XandrosKwikis