Update error

Asked by Bert

Upgraded to Ubuntu 16.4, now I can not run any updates.

Followed instructions at :(https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure).

When I get to Step 6 and run "ubuntu-support-status" in Terminal, this is the output:

b@amachine:~$ ubuntu-support-status
Traceback (most recent call last):
  File "/usr/bin/ubuntu-support-status", line 122, in <module>
    with apt.Cache() as cache:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 113, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 164, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory), E:Could not open file - open (2: No such file or directory), E:Problem opening , E:The package lists or status file could not be parsed or opened.

Thank you for your help

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
Manfred Hampl (m-hampl) said :
#1

What is the output of the commands (to be executed in a terminal window)

uname -a
lsb_release -crid
ls -l /var/lib/dpkg/stat*

Revision history for this message
Bert (bert-cramer) said :
#2

Linux amachine 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
b@amachine:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
b@amachine:~$ ls -l /var/lib/dpkg/stat*

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

What is the output of

ls -l /var/lib/dpkg/stat*

?

Revision history for this message
Bert (bert-cramer) said :
#4

-rw-r--r-- 1 root root 228 фев 17 22:31 /var/lib/dpkg/statoverride
-rw-r--r-- 1 root root 163 окт 22 2014 /var/lib/dpkg/statoverride-old
-rw-r--r-- 1 root root 2876298 июн 13 09:09 /var/lib/dpkg/status-bad
-rw-r--r-- 1 root root 2876298 июн 13 07:31 /var/lib/dpkg/status-old

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

Ok. Apparently you omitted or mistyped one of the commands of the troubleshooting procedure.

The command

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

should help.

Revision history for this message
Bert (bert-cramer) said :
#6

Apologies for any omission or typo.

While that makes,

"ubuntu-support-status"

run with the following output:

b@amachine:~$ ubuntu-support-status
Support status summary of 'amachine':

You have 38 packages (1.4%) supported until январь 2017 (9m)
You have 24 packages (0.9%) supported until апрель 2019 (3y)
You have 1971 packages (74.7%) supported until апрель 2021 (5y)
You have 5 packages (0.2%) supported until март 2017 (9m)

You have 590 packages (22.3%) that can not/no-longer be downloaded
You have 12 packages (0.5%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details

I'm still unable to download and install any updates. Should I keep this question thread open or start a different one?

Thank you for your help so far.

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

This looks ok again.

What output do you get for the following commands:

uname -a
lsb_release -crid
LANG=C sudo apt-get update
LANG=C sudo apt-get dist-upgrade

?

Revision history for this message
Bert (bert-cramer) said :
#8

b@amachine:~$ uname -a
Linux amachine 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
b@amachine:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
b@amachine:~$ LANG=C sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
b@amachine:~$ LANG=C sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-plugins-bad : Depends: libde265-0 (>= 0.8) but it is not
installable
E: Unmet dependencies. Try using -f.

On Sat, Jun 25, 2016 at 2:07 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #295649 on apt in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/apt/+question/295649
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> This looks ok again.
>
> What output do you get for the following commands:
>
> uname -a
> lsb_release -crid
> LANG=C sudo apt-get update
> LANG=C sudo apt-get dist-upgrade
>
> ?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/apt/+question/295649
>
> You received this question notification because you asked the question.
>

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

Ok, now try

LANG=C sudo apt-get install -f

and report the results.

Revision history for this message
Bert (bert-cramer) said :
#10

b@amachine:~$ LANG=C sudo apt-get install -f
[sudo] password for b:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  cdparanoia gstreamer0.10-gconf python-cddb python-gst0.10 python-libxml2
  python-musicbrainzngs
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  gstreamer1.0-plugins-bad
0 upgraded, 0 newly installed, 1 to remove and 77 not upgraded.
35 not fully installed or removed.
After this operation, 5 492 kB disk space will be freed.
Do you want to continue? [Y/n]

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Run:

sudo apt-get --purge autoremove
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

Revision history for this message
Bert (bert-cramer) said :
#12

Thanks Manfred Hampl, that solved my question.