Don't remove your /usr/share/doc. Deleting it deletes all the documentation of all the packages in your system.
Also, to locate which package contains a file foo, you can run 'dpkg --search foo' (or faster version, if you have installed dlocate package: 'dlocate foo'), and to locate which files are contained in package foo, you can run 'dpkg --listfiles foo' (or again: 'dlocate foo')
What debian version are you using? (That is, how did you install your debian and what is the contents of /etc/apt/sources.list and /etc/apt/apt.conf) The package libxcursor-dev exists only in the testing/unstable, so you are probably using one of them.
Afther reading your first post more carefully, I found out that '692 not upgraded.' which sounds quite strange too.
What to do next?
- Check that the contents of /etc/apt/sources.list are correct (or more precisely: that they define package lists for the distribution you want to use).
- Run 'apt-get update' and 'apt-get dist-upgrade' and see if the problem gets fixed.
- If not, is the problem same? If it is, then you could probably have to manually update the xlibs-dev. (how it got wrong in the first place? Installed from knoppix?)
And the problem is still here? Ok, the hard way. Here is how to update xlibs-dev manually. Two steps. a) Retrieve the correct debian package and b) install it.
Retrieving:
The version number of the file depends on the distribution you are using (and there are also
local mirrors you should be using when you retrieve many packages).
For unstable:
http://ftp.debian.org/debian/pool/ma....1-14_i386.deb
For testing:
http://ftp.debian.org/debian/pool/ma...-12.1_i386.deb
For stable:
http://ftp.debian.org/debian/pool/ma...oody1_i386.deb
So either say: 'wget yourURL', or use your favorite browser to get those files.
(these could be normally retrieved automaticly by apt and could be easily retrieved by using packgages.debian.org, but it is down for the moment)
Installing
Run as root: 'dpkg -i yourxlibspackage.deb' (for example in stabe run: 'dpkg -i xlibs-dev_4.1.0-16woody1_i386.deb') in the directory where you retrieved your package.
Now the problem should be fixed and other packages should be installable again.
Finally
Don't forget to came back here and reply on how did it go and ask for possible additional questions.