3

How can I fix the following error?

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 194 MB disk space will be freed.
Do you want to continue? [Y/n] y

dpkg: parse error, in file '/var/lib/dpkg/status' near line 142 package 'python-pkg-resources':
 `Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')

E: Sub-process /usr/bin/dpkg returned an error code (2)

I ran this command

head -142 /var/lib/dpkg/status | tail

and got this output:

Status: install ok installed
Priority: optional
Section: python
Installed-Size: 182
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Source: python-setuptools
Version: 3.3-1ubuntu1
Provides: python2.7-setuptools
Depends: python:any (>= 2.7), python:any (<< 2.8)

closed as off-topic by Braiam, Stephen Kitt, slm May 26 '16 at 5:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Braiam, Stephen Kitt, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Can you please post the output of: head -142 /var/lib/dpkg/status | tail? – eyoung100 Dec 15 '14 at 15:44
  • What version of Ubuntu are you running? Did you install any packages that weren't from Ubuntu itself? – Gilles Dec 15 '14 at 22:43
  • ubuntu 14.04 trusty – Mahendra Verma Dec 16 '14 at 18:48
  • Status: install ok installed Priority: optional Section: python Installed-Size: 182 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: all Source: python-setuptools Version: 3.3-1ubuntu1 Provides: python2.7-setuptools Depends: python:any (>= 2.7), python:any (<< 2.8) – Mahendra Verma Dec 16 '14 at 19:14
  • 14.04 lts trusty – Mahendra Verma Dec 16 '14 at 19:14

Browse other questions tagged or ask your own question.