PDA

View Full Version : [ubuntu] 10.04 Update Manager is broken



adamsiddhi
March 3rd, 2012, 02:47 PM
I am getting major errors when running Update Manager.

Here is a screen shot of my update manager window before attempting to update:

https://lh4.googleusercontent.com/-39Y5dLKmQUE/T1Ige9j1OGI/AAAAAAAAAiQ/dHtsXi_Mm5g/s686/update-manager.png

Here are the errors its spits out in the pop up window after pressing the Update button:


E: /var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-httplib2_0.6.0-1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1

And when I run update-manager from terminal this is what is spit out when Update Manager starts up:


$ update-manager
File "/usr/bin/lsb_release", line 67
print ':'.join(verinfo)
^
SyntaxError: invalid syntax
lsb_release returned exitcode: 1
File "/usr/bin/lsb_release", line 67
print ':'.join(verinfo)
^
SyntaxError: invalid syntax

And I get the same 7 errors as before in the pop up window.

When I run


sudo apt-get upgrade

I get this long list of errors

http://www.pasteall.org/29699/bash

So something is severly wrong. I also tried getting help at ask ubuntu with this post:

http://askubuntu.com/questions/108015/update-manager-updating-process-results-in-error-in-10-04

But as you can see the nature of the errors have changed

dino99
March 3rd, 2012, 06:54 PM
close all your apps then open a terminal & run:

sudo rm /var/cache/apt/archives/*
sudo apt-get update
sudo apt-get install synaptic
sudo synaptic

and upgrade the packages from there, as the previous index was borked.

adamsiddhi
March 3rd, 2012, 08:45 PM
close all your apps then open a terminal & run:

sudo rm /var/cache/apt/archives/*
sudo apt-get update
sudo apt-get install synaptic
sudo synaptic

and upgrade the packages from there, as the previous index was borked.

Ok. After I ran



sudo rm /var/cache/apt/archives/*
sudo apt-get update


I got the following error


E: Archive directory /var/cache/apt/archives/partial is missing.


I decided to go ahead and try to install synaptic and this is what I got


$ sudo apt-get install synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
synaptic is already the newest version.
The following packages were automatically installed and are no longer required:
libmjpegtools-1.9 libnet-daemon-perl libglew1.5 libdbi-perl
libhtml-template-perl libcinelerra libx264-85 libgle3
libdbd-mysql-perl libplrpc-perl mjpegtools libfaac0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
python-lazr.restfulclient python-libxml2 update-manager
update-manager-core update-manager-kde
Suggested packages:
python-libxml2-dbg
The following packages will be upgraded:
python-lazr.restfulclient python-libxml2 update-manager
update-manager-core update-manager-kde
5 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
8 not fully installed or removed.
E: Archive directory /var/cache/apt/archives/partial is missing.


Then I did


$ sudo synaptic
File "/usr/bin/lsb_release", line 67
print ':'.join(verinfo)
^
SyntaxError: invalid syntax
File "/usr/bin/lsb_release", line 67
print ':'.join(verinfo)
^
SyntaxError: invalid syntax
File "/usr/sbin/update-apt-xapian-index", line 42
print "%s..." % self.task,
^
SyntaxError: invalid syntax


and Synaptic Package Manager started up.

How come I got all those errors? And what to do now?

MAFoElffen
March 4th, 2012, 01:07 AM
close all your apps then open a terminal & run:

sudo rm /var/cache/apt/archives/*
sudo apt-get update
sudo apt-get install synaptic
sudo synaptic

and upgrade the packages from there, as the previous index was borked.
I believe what this poster meant to say and which I've seen a "few" times in 10.04:

First clean up the segmentation faults in the apt tree...


sudo rm /var/cache/apt/*.bin
Then rebuild the apt tree index


sudo aptitude update
Fix any broken packages and clean any fragments caused by the previous error


sudo aptitude clean
sudo aptitude install -f
Then try installing your updates


sudo aptitude update
EDIT-- Aptitude is more intelligent than apt-get when it comes to dependencies. Don't know what version you are running... but looking at your screen shot looked to be 10.04 or 10.10 (pre-11.04), because the dialog box and it's controls. 11.04 was different. If so, then you also already had Synaptic installed. They stopped installing that in the default install starting with version 11.10.

I do about 10-15 Ubuntu (and derivatives) installs a week. Sometimes that just happens, whether because of a hardware combination or an obscure upgrade problem that slipped by... I just fix it and let it go. Rarely comes back again.

adamsiddhi
March 4th, 2012, 03:08 PM
I believe what this poster meant to say and which I've seen a "few" times in 10.04:

First clean up the segmentation faults in the apt tree...


sudo rm /var/cache/apt/*.bin
Then rebuild the apt tree index


sudo aptitude update
Fix any broken packages and clean any fragments caused by the previous error


When I do



$ sudo aptitude update


I get the following errors



E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: The list of sources could not be read.
E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: The list of sources could not be read.
E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: Couldn't read list of package sources


Now this is not an uncommon error for me. To fix it I just open up /etc/apt/sources.list.d/akirad.list, add lucid inbetween the link and main, delete the other lines, save and close out. I first asked about this issue here at http://askubuntu.com/questions/107929/apt-get-upgrade-and-apt-get-update-are-now-broken-for-me-in-10-04 (http://askubuntu.com/questions/107929/apt-get-upgrade-and-apt-get-update-are-now-broken-for-me-in-10-04).

The problem is that the akirad.list file always reverts to the following upon restarting Ubuntu.



## Akirad Repository for Ubuntu
## Please report any bug on akir4d at gmail.com

## ppa
deb http://ppa.launchpad.net/akirad/akirad/ubuntu main #Akirad Repository - Main

deb http://ppa.launchpad.net/akirad/ppa/ubuntu main #Akirad Repository - Main

#deb-src http://ppa.launchpad.net/akirad/akirad/ubuntu main #Akirad Repository Sources- Main

#deb-src http://ppa.launchpad.net/akirad/ppa/ubuntu main #Akirad Repository Sources- Main


So that was the first issue I had. How do I make my changes to the akirad.list file permanent?

Proceeding along. When I temporarily fix akirad.list and do


$ sudo aptitude update

I get the following error


Writing extended state information... Done
E: Archive directory /var/cache/apt/archives/partial is missing.


That's not right is it?

MAFoElffen
March 4th, 2012, 07:49 PM
When I do



$ sudo aptitude update
I get the following errors



E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: The list of sources could not be read.
E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: The list of sources could not be read.
E: Malformed line 5 in source list /etc/apt/sources.list.d/akirad.list (dist parse)
E: Couldn't read list of package sources
Now this is not an uncommon error for me. To fix it I just open up /etc/apt/sources.list.d/akirad.list, add lucid inbetween the link and main, delete the other lines, save and close out. I first asked about this issue here at http://askubuntu.com/questions/107929/apt-get-upgrade-and-apt-get-update-are-now-broken-for-me-in-10-04 (http://askubuntu.com/questions/107929/apt-get-upgrade-and-apt-get-update-are-now-broken-for-me-in-10-04).

The problem is that the akirad.list file always reverts to the following upon restarting Ubuntu.



## Akirad Repository for Ubuntu
## Please report any bug on akir4d at gmail.com

## ppa
deb http://ppa.launchpad.net/akirad/akirad/ubuntu main #Akirad Repository - Main

deb http://ppa.launchpad.net/akirad/ppa/ubuntu main #Akirad Repository - Main

#deb-src http://ppa.launchpad.net/akirad/akirad/ubuntu main #Akirad Repository Sources- Main

#deb-src http://ppa.launchpad.net/akirad/ppa/ubuntu main #Akirad Repository Sources- Main
So that was the first issue I had. How do I make my changes to the akirad.list file permanent?

Proceeding along. When I temporarily fix akirad.list and do


$ sudo aptitude updateI get the following error


Writing extended state information... Done
E: Archive directory /var/cache/apt/archives/partial is missing.
That's not right is it?
I think Akarid was a repository the support Cinerella-CV and other video manipulation apps. Are you really using that repo? You know it ends support at Lucid right? No repo in there beyond 10.04.

If not, you could just comment all the lines out or move it to your home folder. But then you said that it rebuilt itself and got passed that error right? Then what, next round it errors? Yes, think move it to get your other updates working. It would all be removed and disabled if you did a distribution upgrade to a newer version of Ubuntu anyways.

The second error, create an empty directory in /var/cache/apt/archives/ and call it "partial"... I'm thinking that the command that dino99 told you to try- mistakenly removed that directory (and other things)... The other things should rebuild on there own, There directory "needs" to be there for things to be placed.

adamsiddhi
March 5th, 2012, 12:54 PM
Ok moving the akirad.list file to home made that issue go away but I am still getting these same following errors when running the GUI Update Manager



E: /var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1

And when I click on the Details button to show the errors I see the following


File "/usr/bin/lsb_release", line 67
print ':'.join(verinfo)
^
SyntaxError: invalid syntax
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 16540 package 'ruby-1.9.1':
error in Version string 'p378-1': version number does not start with digit
dpkg: warning: parsing file '/var/lib/dpkg/available' near line 17495 package 'ruby-1.9.1':
error in Version string 'p378-1': version number does not start with digit
(Reading database ... 500422 files and directories currently installed.)
Preparing to replace update-manager 1:0.134.11.1 (using .../update-manager_1%3a0.134.12.1_all.deb) ...
Traceback (most recent call last):
File "/usr/sbin/gconf-schemas", line 117, in <module>
trim(os.path.join(defaults_dest,"%gconf-tree.xml"), get_valid_languages())
File "/usr/sbin/gconf-schemas", line 18, in get_valid_languages
langs.add(l.split('_')[0])
TypeError: Type str doesn't support the buffer API
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace update-manager-core 1:0.134.11.1 (using .../update-manager-core_1%3a0.134.12.1_amd64.deb) ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-httplib2 0.6.0-1 (using .../python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-wadllib 1.1.4-1ubuntu1 (using .../python-wadllib_1.1.4-1ubuntu1.1_all.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-lazr.restfulclient 0.9.11-1ubuntu1.2 (using .../python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-libxml2 2.7.6.dfsg-1ubuntu1.3 (using .../python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace update-manager-kde 1:0.134.11.1 (using .../update-manager-kde_1%3a0.134.12.1_all.deb) ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb
/var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb
/var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb
/var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb
/var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb
/var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb
/var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 16540 package 'ruby-1.9.1':
error in Version string 'p378-1': version number does not start with digit
dpkg: error processing update-manager-core (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
Setting up firefox-trunk (13.0~a1~hg20120304r88210-0ubuntu1~umd2~lucid) ...
Please restart all running instances of firefox-trunk, or you will experience problems.
Setting up python-gmenu (2.30.0-0ubuntu4) ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
File "/usr/share/gnome-menus/update-gnome-menus-cache", line 48
except ParsingError, e:
^
SyntaxError: invalid syntax
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing python-gmenu (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up google-chrome-stable (17.0.963.65-r124586) ...
dpkg: dependency problems prevent configuration of update-manager-kde:
update-manager-kde depends on update-manager-core; however:
Package update-manager-core is not configured yet.
dpkg: error processing update-manager-kde (--configure):
dependency problems - leaving unconfigured
Setting up blender (2.62+svn44639~lucid1) ...
dpkg: error processing python-wadllib (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
dpkg: error processing python-libxml2 (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
dpkg: error processing python-httplib2 (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
dpkg: dependency problems prevent configuration of update-manager:
update-manager depends on update-manager-core (= 1:0.134.11.1); however:
Package update-manager-core is not configured yet.
dpkg: error processing update-manager (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-lazr.restfulclient:
python-lazr.restfulclient depends on python-wadllib (>= 1.1.4); however:
Package python-wadllib is not configured yet.
python-lazr.restfulclient depends on python-httplib2; however:
Package python-httplib2 is not configured yet.
dpkg: error processing python-lazr.restfulclient (--configure):
dependency problems - leaving unconfigured
Setting up firefox-trunk-globalmenu (13.0~a1~hg20120304r88210-0ubuntu1~umd2~lucid) ...
Processing triggers for menu ...
dpkg-query: warning: parsing file '/var/lib/dpkg/status' near line 16540 package 'ruby-1.9.1':
error in Version string 'p378-1': version number does not start with digit
Errors were encountered while processing:
update-manager-core
python-gmenu
update-manager-kde
python-wadllib
python-libxml2
python-httplib2
update-manager
python-lazr.restfulclient


I will also mention that after creating the partial directory in /var/cache/apt/archives/ the commands


$ sudo aptitude update
$ sudo aptitude upgrade

run fine but I still get a slew of errors with

$ sudo aptitude upgrade

The output/errors are the following


$ sudo aptitude upgrade
W: The "upgrade" command is deprecated; use "safe-upgrade" instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages will be REMOVED:
libcinelerra{u} libdbd-mysql-perl{u} libdbi-perl{u} libfaac0{u} libgle3{u} libglew1.5{u} libhtml-template-perl{u} libmjpegtools-1.9{u}
libnet-daemon-perl{u} libplrpc-perl{u} libx264-85{u} mjpegtools{u}
The following packages will be upgraded:
python-httplib2 python-lazr.restfulclient python-libxml2 python-wadllib update-manager update-manager-core update-manager-kde
The following partially installed packages will be configured:
python-gmenu
7 packages upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
Need to get 0B/1,446kB of archives. After unpacking 13.3MB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 16540 package 'ruby-1.9.1':
error in Version string 'p378-1': version number does not start with digit
dpkg: warning: parsing file '/var/lib/dpkg/available' near line 17495 package 'ruby-1.9.1':
error in Version string 'p378-1': version number does not start with digit
(Reading database ... 500422 files and directories currently installed.)
Preparing to replace update-manager 1:0.134.11.1 (using .../update-manager_1%3a0.134.12.1_all.deb) ...
Traceback (most recent call last):
File "/usr/sbin/gconf-schemas", line 117, in <module>
trim(os.path.join(defaults_dest,"%gconf-tree.xml"), get_valid_languages())
File "/usr/sbin/gconf-schemas", line 18, in get_valid_languages
langs.add(l.split('_')[0])
TypeError: Type str doesn't support the buffer API
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace update-manager-core 1:0.134.11.1 (using .../update-manager-core_1%3a0.134.12.1_amd64.deb) ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-httplib2 0.6.0-1 (using .../python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-wadllib 1.1.4-1ubuntu1 (using .../python-wadllib_1.1.4-1ubuntu1.1_all.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-lazr.restfulclient 0.9.11-1ubuntu1.2 (using .../python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace python-libxml2 2.7.6.dfsg-1ubuntu1.3 (using .../python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb) ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Preparing to replace update-manager-kde 1:0.134.11.1 (using .../update-manager-kde_1%3a0.134.12.1_all.deb) ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error processing /var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
File "/usr/bin/pycentral", line 87
raise ValueError, 'unknown version info %s' % vinfo
^
SyntaxError: invalid syntax
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb
/var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb
/var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb
/var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb
/var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb
/var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb
/var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 16540 package 'ruby-1.9.1':
error in Version string 'p378-1': version number does not start with digit
dpkg: error processing update-manager-core (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
Setting up python-gmenu (2.30.0-0ubuntu4) ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
File "/usr/share/gnome-menus/update-gnome-menus-cache", line 48
except ParsingError, e:
^
SyntaxError: invalid syntax
File "/usr/sbin/update-python-modules", line 52
print x
^
SyntaxError: invalid syntax
dpkg: error processing python-gmenu (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of update-manager-kde:
update-manager-kde depends on update-manager-core; however:
Package update-manager-core is not configured yet.
dpkg: error processing update-manager-kde (--configure):
dependency problems - leaving unconfigured
dpkg: error processing python-wadllib (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
dpkg: error processing python-libxml2 (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
dpkg: error processing python-httplib2 (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.
dpkg: dependency problems prevent configuration of update-manager:
update-manager depends on update-manager-core (= 1:0.134.11.1); however:
Package update-manager-core is not configured yet.
dpkg: error processing update-manager (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-lazr.restfulclient:
python-lazr.restfulclient depends on python-wadllib (>= 1.1.4); however:
Package python-wadllib is not configured yet.
python-lazr.restfulclient depends on python-httplib2; however:
Package python-httplib2 is not configured yet.
dpkg: error processing python-lazr.restfulclient (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
update-manager-core
python-gmenu
update-manager-kde
python-wadllib
python-libxml2
python-httplib2
update-manager
python-lazr.restfulclient
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done


It is basically the same output as Update Manager gave me when I clicked the Details button.

What is going on here?

Lasall
March 5th, 2012, 01:03 PM
Hi adamsiddhi,

clean your APT-cache:


sudo apt-get clean


Then manually edit your /var/lib/dpkg/status because it is a bit messed up (see dpkg parsing warnings).


Kind regards

Lasall

adamsiddhi
March 6th, 2012, 01:35 PM
Hi adamsiddhi,

clean your APT-cache:


sudo apt-get clean


Then manually edit your /var/lib/dpkg/status because it is a bit messed up (see dpkg parsing warnings).


Kind regards

Lasall

Edit the status file? Its over 40K lines. I wouldn't know where to begin Lasall.

Anyways. I did run the clean command and


sudo apt-get upgrade

worked again. Still I see errors. When I run Update Manager I am getting these errors


E: /var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1

plucky
March 6th, 2012, 01:53 PM
Edit the status file? Its over 40K lines. I wouldn't know where to begin Lasall.

Anyways. I did run the clean command and


sudo apt-get upgrade

worked again. Still I see errors. When I run Update Manager I am getting these errors


E: /var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1



You could try from a terminal
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-broken
sudo mv /var/lib/dpkg/status-old /var/lib/dpkg/status

Copy and paste each line to the terminal window.

What it is doing is, the first line will move the status file to a file called status-broken and the second file will move the status-old file to a new status file.

Then run
sudo apt-get update
sudo apt-get upgrade

and see what happens.

Provided the status-old file is not messed up,it could fix your problem.If it is messed up you can revert back to how it is now by reversing the move commands.

Good luck

Lasall
March 6th, 2012, 02:28 PM
Edit the status file? Its over 40K lines. I wouldn't know where to begin Lasall.

Anyways. I did run the clean command and


sudo apt-get upgrade

worked again. Still I see errors. When I run Update Manager I am getting these errors


E: /var/cache/apt/archives/update-manager_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-core_1%3a0.134.12.1_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-httplib2_0.7.2-1ubuntu2~0.10.04.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-wadllib_1.1.4-1ubuntu1.1_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-lazr.restfulclient_0.9.11-1ubuntu1.3_all.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-libxml2_2.7.6.dfsg-1ubuntu1.4_amd64.deb: subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/update-manager-kde_1%3a0.134.12.1_all.deb: subprocess new pre-removal script returned error exit status 1

You have to look at warnings like that: "dpkg: warning: parsing file '/var/lib/dpkg/status' near line XXX"
I think there is no need to use a backup copy of status file.