wis*_*key 11 software-center upgrade installation package-management
所以几天前我一直在尝试升级 Ubuntu 11.10 64 位并收到一个错误:
dpkg: ../../src/archives.c:978: tarobject: 断言 `r == stab.st_size' 失败。
所以我关注了这个 Ubuntu 论坛帖子和这个.
ubuntu-docs从信息文件夹和状态文件中删除。
现在,每当我尝试安装/删除/升级任何软件包时,都会收到错误消息:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 968, in simulate
trans.unauthenticated = self._simulate_helper(trans)
File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 1092, in _simulate_helper
return depends, self._cache.required_download, \
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 235, in required_download
pm.get_archives(fetcher, self._list, self._records)
SystemError: E:I wasn't able to locate a file for the ubuntu-docs package. This might mean you need to manually fix this package.
Run Code Online (Sandbox Code Playgroud)
当我尝试ubuntu-docs从命令行安装时,我得到以下输出:
BlockquoteReading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
ubuntu-docs
1 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
1 not fully installed or removed.
Need to get 1,408 kB of archives.
After this operation, 22.5 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main ubuntu-docs all 11.10.4 [1,408 kB]
Fetched 1,408 kB in 5s (265 kB/s)
(Reading database ...
dpkg: warning: files list file for package `ubuntu-docs' missing, assuming package has no files currently installed.
(Reading database ... 323646 files and directories currently installed.)
Preparing to replace ubuntu-docs 11.10.4 (using .../ubuntu-docs_11.10.4_all.deb) ...
Unpacking replacement ubuntu-docs ...
dpkg: ../../src/archives.c:978: tarobject: Assertion `r == stab.st_size' failed.
E: Sub-process /usr/bin/dpkg exited unexpectedly
Run Code Online (Sandbox Code Playgroud)
...看起来与我开始遇到问题时大致相同,所以我查看了信息 - 没有包,ubuntu-docs但状态中有条目,所以我删除了它并再次尝试,但是一旦我重新出现sudo dpkg --configure -a该条目ubuntu-docs.
有什么想法吗?
编辑 (不是作为保存格式的注释):
这个线程说我需要sudo apt-get update在从状态中删除相应的行后运行。所以我sudo apt-get clean跟着跑了sudo apt-get update。但是我收到一条消息说:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
Run Code Online (Sandbox Code Playgroud)
运行后sudo dpkg --configure -a,状态文件包含以下几行:
Package: ubuntu-docs
Status: install reinstreq half-installed
Priority: optional
Section: doc
Version: 11.10.4
Run Code Online (Sandbox Code Playgroud)
不确定它是否有帮助。
小智 7
有时,损坏的安装包会损坏您的包管理系统,使您的 Linux 无法安装或删除任何包(软件)。这是我在尝试为 Ubuntu 安装 ndas-admin 后从 apt-get 得到的消息错误。
$sudo apt-get install mplayer (or any package) 读取包列表…完成构建依赖树
读取状态信息…完成 E:需要重新安装包 ndas-admin,但我找不到它的存档。(这是错误)
我试图sudo apt-get install -f解决这个问题,但遇到了同样的错误。我唯一的选择是手动编辑 dpkg 状态文件。
$ sudo gedit /var/lib/dpkg/status (if you prefer you can use vi instead of gedit)
Locate the corrupt package, and remove the whole block of information about it and save the file. Mine looked like this:
Package: ndas-admin
Status: deinstall reinstreq half-configured
Priority: extra
Section: alien
Installed-Size: 100
Maintainer: root <root@ubuntu510>
Architecture: i386
Version: 1.0.2-24
Depends: libc6 (>= 2.3.4-1)
Description: Administration toosl for XIMETA,Inc NDAS device driver for Linux operating system
ndas-admin – This program allows the user to register/enable/disable/unregister the XIMETA NDAS hard disk.
.
(Converted from a rpm package by alien version 8.53.)
Run Code Online (Sandbox Code Playgroud)
固定的。希望这对其他人有帮助。
这是对我有用的:
sudo dpkg --force-all -r ubuntu-docs
Run Code Online (Sandbox Code Playgroud)
如果有任何问题,我会再次报告。BTW 解决方案发布在如何让 dpkg 再次工作?
哦,是的,忠告:现在我每次都需要使用 Synaptic 来更新系统——因为 ubuntu-docs 是在每次更新中,我需要取消它:-/。猜猜我会开始其他问题来询问如何从每个后续更新中删除特定包。
| 归档时间: |
|
| 查看次数: |
22699 次 |
| 最近记录: |