Apt-Get Upgrade Problems

Asked by Ben

Hi,

Trying to do an apt-get upgrade and keep encountering an error with missing file lists (see below):

 apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  grub-common grub-pc grub-pc-bin grub2-common libparted0debian1 parted
6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,470 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ...
dpkg: warning: files list file for package `libx11-xcb1:i386' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libxcb-render0:i386' missing, assuming package has no files currently installed.
(Reading database ... 95%dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libxcb-render0' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

I've tried specifically reinstalling libx11-xcb1:i386 and libxcb-render0, but they also won't remove or reinstall due to their own missing file list.

Any suggestion would be greatly appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

sudo apt-get --reinstall install libx11-xcb1:i386

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

If actionparsnip's command fails, try

sudo rm -v /var/lib/dpkg/info/libxcb-render0.list
sudo apt-get --reinstall install libx11-xcb1:i386 libxcb-render0 libxcb-render0:i386

and copy/paste all output into that question document that we can see all messages.

Revision history for this message
Ben (bencraig) said :
#3

Many thanks for the responses. Still no dice sadly. I did try the -reinstall install option previously. The output of this is:

host:/home/user# sudo apt-get --reinstall install libx11-xcb1:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/20.9 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ...
dpkg: warning: files list file for package `libx11-xcb1:i386' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libxcb-render0:i386' missing, assuming package has no files currently installed.
(Reading database ... 95%dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libxcb-render0' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

I did also try Manfred's suggestion, but libxcb-render0.list doesn't exist:

host:/home/user# sudo rm -v /var/lib/dpkg/info/libxcb-render0.list
rm: cannot remove `/var/lib/dpkg/info/libxcb-render0.list': No such file or directory

And the apt-get command returns:

host:/home/user# sudo apt-get --reinstall install libx11-xcb1:i386 libxcb-render0 libxcb-render0:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 7 not upgraded.
Need to get 0 B/48.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ...
dpkg: warning: files list file for package `libx11-xcb1:i386' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libxcb-render0:i386' missing, assuming package has no files currently installed.
(Reading database ... 95%dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libxcb-render0' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

What is the output of

ls -l /var/lib/dpkg/info/libxcb-render*.list

Revision history for this message
Ben (bencraig) said :
#5

Just the one file:

-rw-r--r-- 1 root root 283 Jun 6 2013 /var/lib/dpkg/info/libxcb-render0:amd64.list

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#6

ok, then try

sudo rm -v /var/lib/dpkg/info/libxcb-render0:amd64.list
sudo apt-get --reinstall install libx11-xcb1:i386 libxcb-render0 libxcb-render0:i386
sudo apt-get update

and report the outcome.

Revision history for this message
Ben (bencraig) said :
#7

That fixed it. Thanks!

Revision history for this message
Ben (bencraig) said :
#8

Thanks Manfred Hampl, that solved my question.