所以几天前我一直在尝试升级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.
当我尝试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
...看起来和我开始遇到问题时一样,所以我查看了信息-没有包,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.
运行后sudo dpkg --configure -a
,状态文件包含以下几行:
Package: ubuntu-docs
Status: install reinstreq half-installed
Priority: optional
Section: doc
Version: 11.10.4
不确定是否有帮助。