Ubuntu 8.10 update error

Asked by David Hjelstrom

When I try to update I get an error message that some packages failed to install. I also get this same error when I try to add applications with Add/Remove... Opening the details yields the following:

Preconfiguring Packages
dpkg: parse error in file '/var/lib/dpks/available' near line 18588 package 'libogst resmer 0.10.0':
Depends field, missing package name, or garbage where package name is expected
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install. Trying to recover.

It doesn't actually appear that it is trying to recover. I am new to Linux so please give me step by step help!
Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Matthew Lye (matthew.lye) said :
#1

Trying to recover means that its trying to rollback your system to before you tried to install, not that its trying to continue anyway.

For this i would recommend trying to do the install through synaptic package manager or terminal if at all possible as terminal gives the best output on failure.

Revision history for this message
Bhavani Shankar (bhavi) said :
#2

To fix broken packages

Open up synaptic

Choose Edit > Fix Broken Packages from the menu.

Choose Apply Marked Changes from the Edit menu or press Ctrl + P.

or from cli

sudo apt-get -f install
sudo apt-get --fix-missing install

Revision history for this message
David Hjelstrom (d-g-hjelstrom) said :
#3

I tried synaptic, fix broken packages and got the same error message so I tried the cli with the following results:

When I typed in; sudo apt-get -f install
I get:

david@david-desktop:~$ sudo apt-get -f install

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following packages were automatically installed and are no longer required:

  linux-headers-2.6.27-7 linux-headers-2.6.27-7-generic

Use 'apt-get autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.

23 not fully installed or removed.

After this operation, 0B of additional disk space will be used.

dpkg: parse error, in file `/var/lib/dpkg/available' near line 18588 package `libgstreamer0.10-0':

 `Depends' field, missing package name, or garbage where package name expected

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

david@david-desktop:~$

Then, when I typed in: sudo apt-get –fix-missing install
I get:

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following packages were automatically installed and are no longer required:

  linux-headers-2.6.27-7 linux-headers-2.6.27-7-generic

Use 'apt-get autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.

23 not fully installed or removed.

After this operation, 0B of additional disk space will be used.

dpkg: parse error, in file `/var/lib/dpkg/available' near line 18588 package `libgstreamer0.10-0':

 `Depends' field, missing package name, or garbage where package name expected

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

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#4

Open a Terminal from the menu Applications → Accessories → Terminal and type:
(if the system ask you a password give your user password, you will not see nothing when you type it, then press enter)

sudo dpkg --clear-avail
sudo dpkg --configure -a

then to update and upgrade and also check pending or missing packages, still using terminal type:

sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

Hope this helps

Revision history for this message
Tom (tom6) said :
#5

There's always the "Recovery Mode" option when you next boot-up your machine instead of choosing the normal option for booting into Ubuntu choose the one that says "Recovery Mode" at the end. It has a "Fix Broken Packages" type option as well as a clean up option that makes the system work a little bit faster and better, if it's needed.

Good luck and regards from
Tom :)

Revision history for this message
David Hjelstrom (d-g-hjelstrom) said :
#6

Thanks marcobra, that solved my question.