Saturday, February 24, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 23369  / 1 Year ago, thu, january 12, 2023, 4:52:18

So I've been trying to upgrade Ubuntu 11.10 64-bit few days back and received an error:




dpkg: ../../src/archives.c:978: tarobject: Assertion `r == stab.st_size' failed.




So I followed this Ubuntu Forums post and this one.



Removed ubuntu-docs from info folder and status file.



Now whenever I try to install/remove/upgrade any package I receive an error:



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.


When I try to install ubuntu-docs from command line, I get this output:



 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


...which looks about the same as when I started with problem, so I looked in info -- there is no package ubuntu-docs but there is entry in status so I deleted it and tried again, but as soon as I do sudo dpkg --configure -a the entry for ubuntu-docs reappears.



Any thoughts?



Edit (not as a comment to save formatting):



This thread says I need to run sudo apt-get update after removing corresponding lines from status. So I ran sudo apt-get clean followed by sudo apt-get update. But I got a message saying:



E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.


After running sudo dpkg --configure -a, status file contains following lines:



Package: ubuntu-docs
Status: install reinstreq half-installed
Priority: optional
Section: doc
Version: 11.10.4


Not sure if it helps.


More From » upgrade

 Answers
7

Here is what worked for me:



sudo dpkg --force-all -r ubuntu-docs


I'll report if anything goes wrong about it again.
BTW solution was posted at How to get dpkg working again?



Ohh yea word of advice: Now I need to use Synaptic to update system everytime -- cause ubuntu-docs is in every update and I need to untick it :-/. Guess I'll start other question to ask how to remove particular package from every subsequent update.


[#42863] Friday, January 13, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
earxcept

Total Points: 310
Total Questions: 115
Total Answers: 111

Location: Japan
Member since Sat, Oct 2, 2021
2 Years ago
;