| (Reading database ... 97451 files and directories currently installed.)
| Preparing to replace kdebase-libs 4:2.2.0.20010822-1 (using
| .../kdebase-libs_4%3a2.2.2-13_i386.deb) ...
| Unpacking replacement kdebase-libs ...
| dpkg: error processing
| /var/cache/apt/archives/kdebase-libs_4%3a2.2.2-13_i386.deb (--unpack):
|  trying to overwrite `/usr/share/applnk/Settings/Sound/arts.desktop',
| which is also in package kdebase
| dpkg-deb: subprocess paste killed by signal (Broken pipe)

This isn't a big deal. I'd bet a bug report is already filed. :) The
problem is two packages contain a file with the same name and path (don't
confuse this with the same file, it might not be, even though it usually
is.)

In this case, it's a KDE menu item. Nothing is going to break horibly if
one of them is bad. dpkg --force-overwrite -i
/var/cache/apt/archives/kdebase-libs_4%3a2.2.2-13_i386.deb

will get you through, or just wait for things to be fixed.

| Preparing to replace xemacs21-bin 21.4.5-1 (using
| .../xemacs21-bin_21.4.6-7_i386.deb) ...
| update-alternatives: unable to make /usr/man/man1/editor.1.gz.dpkg-tmp a
| symlink to /etc/alternatives/editor.1.gz: No such file or directory
| dpkg: warning - old pre-removal script returned error exit status 2
| dpkg - trying script from the new package instead ...
| update-alternatives: unable to make /usr/man/man1/editor.1.gz.dpkg-tmp a
| symlink to /etc/alternatives/editor.1.gz: No such file or directory
| dpkg: error processing
| /var/cache/apt/archives/xemacs21-bin_21.4.6-7_i386.deb (--unpack):
|  subprocess new pre-removal script returned error exit status 2
| update-alternatives: unable to make /usr/man/man1/editor.1.gz.dpkg-tmp a
| symlink to /etc/alternatives/editor.1.gz: No such file or directory
| dpkg: error while cleaning up:
|  subprocess post-installation script returned error exit status 2
| Errors were encountered while processing:
|  /var/cache/apt/archives/kdebase-libs_4%3a2.2.2-13_i386.deb
|  /var/cache/apt/archives/xemacs21-bin_21.4.6-7_i386.deb
| E: Sub-process /usr/bin/dpkg returned an error code (1)

This one is a bit tricker. Debian's alternatives system is useful. What's
it's trying to do is set xemacs as your default $EDITOR. Personally, I
don't think this is such a hot idea, as I do lots of admin outside of X.

Before running apt-get again, try running (as root):
update-alternatives  --config editor
Set your editor to something other than xemacs. nano, vi, vim, emacs are
good choices. (as apt won't let you install packages at this point,
set it to something already installed.)

My guess is the exit status two is from update-alternatives. It means:
Problems were encountered whilst parsing the command line or performing
the action.

Best 1am guess for a quick work around. ;-)

Andrew S. Zbikowski | http://www.ringworld.org
"The irony is that Bill Gates claims to be making
a stable operating system and Linus Torvalds claims
to be trying to take over the world."