[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[solved] apt-get error "short read in buffer"



Jonathan Kaye wrote:

> Hi all,
> Suddenly when upgrading my system whether using apt-get, aptitude or wajig
> I get the following error message:
> -------------------------------------
> (Reading database ... dpkg: error
> processing /var/cache/apt/archives/libmjpegtools0_1%3a1.8.0-0.5_i386.deb
> (--unpack):
>  short read in buffer_copy (files list for package `x11proto-randr-dev')
> Errors were encountered while processing:
>  /var/cache/apt/archives/libmjpegtools0_1%3a1.8.0-0.5_i386.deb
> Processing was halted because there were too many errors.
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> A package failed to install.  Trying to recover:
> ---------------------------------------
> I've tried cleaning out the /var/cache/apt/archives folder but that
> doesn't help. I can't remove x11proto-randr-dev. This gives the same error
> message. Googling the problem has proven extremely unhelpful. The only
> thing looking remotely like a solution is apt-get -f [some command] and
> that doesn't work either. Results in the same error message.
> 
> Any help would be greatly appreciated.
> Cheers,
> Jonathan
Thanks to all those who knew the answer and would have replied. I carried on
googling and eventually found the answer.
The file lists for each package are kept here: /var/lib/dpkg/info with the
extension .list. For some reason my file x11proto-randr-dev.list was empty.
I did a dpkg-deb --contents for that package and got a list of files which
I then edited to remove permissions size etc. so it looked just like any of
the other .list files in the folder. I replaced the empty file with my
newly created file list and that sorted out the problem. All that was
really required was to know where the installed package file lists are kept
and now I know it's in /var/lib/dpkg/info
Knowledge is power. That's why I love Gnu/Linux.
Jonathan
-- 
Registerd Linux user #445917 at http://counter.li.org/



Reply to: