Results 1 to 7 of 7

Thread: dpkg problems

  1. #1
    Join Date
    May 2009
    Beans
    3

    dpkg problems

    I was just wondering if anyone has had some experience with this error?

    I ran the update manager this evening on a fresh install of 8.10, and it appeared to hang for a fair while when restarting, so i hit the reset button. I'm going to assume it's pretty bad. But any help would be much appreciated.

    The update manager now says that there's 301 new updates, and when i tell it to install all updates, it gets this error:

    dpkg: parse error, in file '/var/lib/dpkg/available' near line 1:
    field name '
    dpkg: parse error, in file '/var/lib/dpkg/available' near line 1:
    field name '
    E: Sub-process /usr/bin/dpkg returned an error code (2)
    A package failed to install. Trying to recover:

  2. #2
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: dpkg problems

    Open a terminal and run:
    (Applications -> Accessories -> Terminal)

    Code:
    sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
    
    sudo apt-get update

  3. #3
    Join Date
    May 2009
    Beans
    3

    Re: dpkg problems

    Thanks for the help, I just went to install Gmount-iso, and when i clicked apply changes, it came up with almost exactly the same error, being:

    dpkg: parse error, in file '/var/lib/dpkg/available' near line 1:
    field name '

    Any help would be great.

  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: dpkg problems

    Here is a different way to solve the 'available' file problem:
    Code:
    sudo mv /var/lib/dpkg/available /var/lib/dpkg/available.bad
    sudo touch /var/lib/dpkg/available
    The above will create a new, empty "available" file. This may solve the problem.

    If you want, you can 'rebuild' the available file, which is now empty:
    Code:
    sudo apt-get install dselect
    sudo dselect update
    GRUB2

    Retired.

  5. #5
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: dpkg problems

    try:
    Code:
    sudo dpkg --clear-avail
    
    sudo apt-get update
    EDIT: never mind.

  6. #6
    Join Date
    May 2009
    Beans
    3

    Re: dpkg problems

    Thanks heaps. That appears to have cleared it all up.

  7. #7
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: dpkg problems

    Quote Originally Posted by sisco311 View Post
    sudo dpkg --clear-avail
    EDIT: never mind.
    Actually though, that's a lot simpler way to empty 'available'.

    The update command doesn't appear to repopulate the file the way dselect does.
    GRUB2

    Retired.

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
  •