Results 1 to 5 of 5

Thread: corrupted package database

  1. #1
    Join Date
    Aug 2007
    Location
    istanbul
    Beans
    27
    Distro
    Ubuntu 10.04 Lucid Lynx

    corrupted package database

    dpkg, apt-get, synaptic don't work!

    I was busy cloning my hard drive, as my old drive was suffering from bad blocks detected after the karmic upgrade. I followed a neat tutorial in http://forums.linuxmint.com/viewtopic.php?t=3969 which guided me through the process. Everything went nearly flawless. All my data was transferred.

    However, I noticed that after I backed up all my data, I had removed four packages related with the annoying ubuntuone package using apt-get. The /var/lib/dpkg/status file changed during the process... The packages removed were: ubuntuone-client, ubuntuone-client-gnome, python-ubuntuone-client, and python-ubuntuone-storageprot.

    Another thing happened when I plugged the new drive in, the swap was not recognized. I somehow managed to bring it up without swap, but the data in swap was lost (where /var/lib/dpkg/status was also lost I think)

    Thus, after a couple of reboots, fsck fixed the filesystem by attaching lost inodes and stuff. The file /var/lib/dpkg/status could not be found, and I copied it over from the old drive, but it was not consistent with the package state as I had updated the package state after I backed up my data.

    Now, I have the ubuntuone package installed in my system, but when I run synaptic it shows up as NOT installed.

    And when I try re-installing it this is what I get:
    Code:
    dpkg: parse error, in file '/var/lib/dpkg/available' near line 0:
     newline in field name `1'
    E: Sub-process /usr/bin/dpkg returned an error code (2)
    A package failed to install.  Trying to recover:
    dpkg: parse error, in file '/var/lib/dpkg/available' near line 0:
     newline in field name `1'
    Guidance is appreciated...
    Last edited by fethio; November 13th, 2009 at 08:34 PM. Reason: [SOLVED]

  2. #2
    Join Date
    Sep 2008
    Beans
    1,029
    Distro
    Ubuntu Development Release

    Re: corrupted package database

    From the command line do:

    Code:
    sudo dpkg --clear-avail && sudo apt-get update
    Later, Seeker
    Last edited by seeker5528; November 13th, 2009 at 08:28 PM.

  3. #3
    Join Date
    Aug 2007
    Location
    istanbul
    Beans
    27
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: corrupted package database

    Took care of the problem.

    Following those two magical lines of code, I could first reinstall and then completely remove the four annoying packages.

    Thanks and praises...

  4. #4
    Join Date
    Sep 2008
    Beans
    1,029
    Distro
    Ubuntu Development Release

    Re: corrupted package database

    Unless you got to it pretty quickly before I edited the post, while I was researching the use of '&&' it should have been one line.

    You should be able to change the prefix of the thread to [SOLVED] then, under thread tools there is a link to mark the thread as solved.

    Later, Seeker
    Last edited by seeker5528; November 13th, 2009 at 11:54 PM.

  5. #5
    Join Date
    Aug 2007
    Location
    istanbul
    Beans
    27
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: corrupted package database

    Done...

    Yes, I did the two line version before you edited your reply

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •