My Book Live 上的 apt 升级错误

My Book Live 上的 apt 升级错误

我有一台 WD My Book Live 网络硬盘 (http://www.wdc.com/en/products/products.aspx?id=280) 在我的局域网上。

我可以通过 SSH 连接到似乎运行 Debian 的网络驱动器:

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

我尝试做的第一件事是检查更新,但似乎存在阻止apt升级软件包的错误。

以下是我运行的升级命令的一些输出:

>> 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)

我不知道如何摆脱这种循环,也许apt包已损坏,必须手动重新安装,如果是这样,我该怎么做?

非常感谢你的帮助。

编辑:我不知道为什么会立即被否决,但如果问题很明显/写得不好/偏离主题,我会很乐意根据您的评论对其进行改进/将其带到其他地方。

答案1

您的公寓设置有些奇怪。 奇怪的是,lenny、squeeze 和 wheezy 混杂在一起。

如果您自己没有这样做,我只能猜测 WD 这样做是为了阻止您在盒子里乱搞。尝试从三个不同的 Debian 版本中提取软件包会给您带来麻烦。

这个Bad file descriptor错误令人担忧。fsck在继续操作之前,您的磁盘需要备份。如果这些是我的文件,我也需要一个备份。

提到package wd-nas 02.50.00-96731强烈暗示 WD 构建了自己的软件包以安装在其设备上,而您无法访问这些软件包。如果您尝试apt在此盒子上使用,这也会给您带来问题。

相关内容