Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a WD My Book Live network drive (http://www.wdc.com/en/products/products.aspx?id=280) on my LAN.

I can SSH on the network drive which seems to run Debian:

>> cat /etc/issue
Debian GNU/Linux 5.0 \n \l

The first thing I tried is to check for updates, but it seems that there are errors preventing apt from upgrading packages.

Here are some outputs of upgrade commands I ran:

>> apt-get update
Hit http://ftp.us.debian.org squeeze Release.gpg
Hit http://ftp.us.debian.org wheezy Release.gpg
Hit http://ftp.us.debian.org squeeze Release
Hit http://ftp.us.debian.org wheezy Release
Ign http://ftp.us.debian.org squeeze/main Packages/DiffIndex
Hit http://ftp.us.debian.org wheezy/main Packages/DiffIndex
Hit http://ftp.us.debian.org squeeze/main Packages
Reading package lists... Done

>> apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  libapt-pkg4.12: Breaks: apt (< 0.9.4~) but 0.7.20.2+lenny1 is installed
E: Unmet dependencies. Try using -f.

>> apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  apt
Suggested packages:
  aptitude synaptic wajig dpkg-dev apt-doc python-apt
The following packages will be upgraded:
  apt
1 upgraded, 0 newly installed, 0 to remove and 306 not upgraded.
3 not fully installed or removed.
Need to get 0B/1269kB of archives.
After this operation, 2190kB disk space will be freed.
Do you want to continue [Y/n]? Y
apt-extracttemplates: /usr/lib/libz.so.1: version `ZLIB_1.2.3.3' not found (required by /usr/lib/powerpc-linux-gnu/libapt-pkg.so.4.12)
debconf: apt-extracttemplates failed: Bad file descriptor
(Reading database ...
dpkg: warning: files list file for package `libparted0' missing, assuming package has no files currently installed.
(Reading database ... 19053 files and directories currently installed.)
Preparing to replace apt 0.7.20.2+lenny1 (using .../apt_0.9.7.7_powerpc.deb) ...
Unpacking replacement apt ...
dpkg: error processing /var/cache/apt/archives/apt_0.9.7.7_powerpc.deb (--unpack):
 trying to overwrite '/etc/logrotate.d/apt', which is also in package wd-nas 02.50.00-96731
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/apt_0.9.7.7_powerpc.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I cannot see how to get out of this loop, maybe the apt package is broken and must be reinstalled manually, if so, how would I proceed to do it?

Thanks a lot for your help.

Edit: I dont know what's with the instant downvote, but if the question is obvious / poorly written / off-topic I'll be glad to improve it / take it elsewhere according to your comments.

share|improve this question

closed as off topic by Sven, Dave M, Michael Hampton, mdpc, Stefan Lasiewski Mar 4 '13 at 5:30

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
My guess at the downvote is because this doesn't look like a professional sysadmin question which would make it off topic here. It also looks like a very bad idea which probably makes it off topic everywhere. I would recommend asking yourself "What is the root problem you are trying to solve here?" –  Ladadadada Mar 3 '13 at 16:45
    
Indeed it is not a professional question, it's been a long time since I last visited serverfault and I guess I forgot its scope, my bad. I guess the question can be deleted. Anyway, thanks for taking the time of answering, I'll take your advice and stop messing with the drive before it's too late. –  Aabaz Mar 3 '13 at 17:06

1 Answer 1

There's some weirdness in your apt setup there. A strange mix of lenny, squeeze and wheezy.

If you didn't do this yourself, I can only guess that WD did that to stop you messing around in the box. Trying to pull packages from three different releases of Debian is going to cause you problems.

The Bad file descriptor error is concerning. Your disks want a fsck before you go any further. I'd also want a backup if these were my file.

The mention of package wd-nas 02.50.00-96731 suggests strongly that WD build their own packages to install on their devices and you won't have access to those packages. This is also going to cause you problems if you attempt to use apt on this box.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.