Announcement

Collapse
No announcement yet.

[Solved] Upgrade problem: Sub-process /usr/bin/dpkg returned an error code (1)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Solved] Upgrade problem: Sub-process /usr/bin/dpkg returned an error code (1)

    I'm having problems with making changes with apt-get, aptitude, synaptic, and adept

    Having run

    sudo dpkg -audit

    I get

    The following packages are in a mess due to serious problems during
    installation. They must be reinstalled for them (and any packages
    that depend on them) to function properly:
    linux-image-2.6.24-19-generic Linux kernel image for version 2.6.24 on x86/x86


    I then run

    sudo apt-get install linux-image-2.6.24-19-generic

    and get

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
    libaccess-bridge-java linux-headers-2.6.24-18-generic libdb4.5 linux-headers-2.6.24-18
    Use 'apt-get autoremove' to remove them.
    Suggested packages:
    linux-doc-2.6.24 linux-source-2.6.24
    The following packages will be upgraded:
    linux-image-2.6.24-19-generic
    1 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
    1 not fully installed or removed.
    Need to get 0B/18.4MB of archives.
    After this operation, 4096B of additional disk space will be used.
    (Reading database ... dpkg: error processing /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb (--unpack):
    files list file for package `linux-image-2.6.24-19-generic' is missing final newline
    Errors were encountered while processing:
    /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb
    Processing was halted because there were too many errors.
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    Any ideas how I solve this one?

    #2
    Re: Upgrade problem: Sub-process /usr/bin/dpkg returned an error code (1)

    What is returned when you type (in a console):
    Code:
    aptitude why linux-image-2.6.24-19-generic
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Upgrade problem: Sub-process /usr/bin/dpkg returned an error code (1)

      Thanks, ran that. It returns

      The package "linux-image-2.6.24-19-generic" is manually installed.

      Comment


        #4
        Re: Upgrade problem: Sub-process /usr/bin/dpkg returned an error code (1)

        Maybe, searching with the "files list file for package missing final newline" =>


        > Bug 108189: files list file for package `*' is missing final newline
        APt-get, adept, and the restricted drivers manager might halt installing packages when one or more of the files in: /var/lib/dpkg/info/ is corrupt.
        ...

        Since all these files seem to contain only a string of @^@^@^@^@^@^@^@^@^@^@^@^
        it seems they are redundant, and i ventured on moving them from the folder, this solved the problem...
        > apt-get dpkg error: files list file ... missing final newline
        ...the file /var/lib/dpkg/info/smbfs.list was corrupted, it was all binary crap. Dunno how this could happen, but it was. So justin advised me to delete the file (actually, I mv'd it) - and, voila, apt warned me that the files list could not be found for smbfs, but at least I could apt-get remove smbfs --purge and install it again (apt-get install smbfs) - that took the biscuit!...
        > list file for package missing final newline
        ...
        If you're new to Debian/Ubuntu and are still finding your
        way around, here you go:

        1. The package list files are in /var/lib/dpkg/info

        In my case /var/lib/dpkg/info/libgtk1.2.list was corrupted
        (its contents were binary cruft).

        So the best way to go about this is to

        2. Manually reinstall the affected package

        # move the info dir containing corrupted data out of the
        # way, and create a new 'info' dir
        cd /var/lib/dpkg
        sudo mv info info.bak
        sudo mkdir info

        # reinstall the affected package, in my case this was
        sudo apt-get --reinstall install libgtk1.2

        # this will print lots of warnings about missing list
        # files for the dependencies, which is obvious.
        # now move the newly generated files in 'info/' to the
        # 'info.bak/' directory containing info for all packages
        # this will replace the information for the package
        # we just installed
        sudo mv info/* info.bak/

        # and now get things back to where they were
        sudo rm -rf info
        sudo mv info.bak info
        ...
        Before you edit, BACKUP !

        Why there are dead links ?
        1. Thread: Please explain how to access old kubuntu forum posts
        2. Thread: Lost Information

        Comment


          #5
          Re: Upgrade problem: Sub-process /usr/bin/dpkg returned an error code (1)

          I've tried a number of things following these suggestions

          Ran ls /var/lib/dpkg

          Got

          alternatives cmethopt info parts status updates
          available diversions lock statoverride status-old
          available-old diversions-old methods statoverride-old triggers


          Then I ran

          ls /var/cache/apt/archives/

          Got a full list of the archives, which included

          linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb

          Moved this using

          sudo mv /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb

          to a text file, which gives a long binary file I can't understand

          Ran

          sudo apt-get update

          followed by

          sudo apt-get install

          this halted at the same old error message

          Reading database ... dpkg: error processing /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb (--unpack):
          files list file for package `linux-image-2.6.24-19-generic' is missing final newline
          Errors were encountered while processing:
          /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb
          Processing was halted because there were too many errors.
          E: Sub-process /usr/bin/dpkg returned an error code (1


          Tried

          sudo rm /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb

          then

          sudo aptitude

          this prompted me with the message that

          E: I wasn't able to locate the file for the linux-image-2.6.24-19-generic package. This might mean you might have to manually fix this package.

          E: Internal error. Couldn't generate list of packages to download.


          I've tried running both Synaptic as well, and it also keeps returning the error message

          E: /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb: files list file for package `linux-image-2.6.24-19-generic' is missing final newline

          Do I need to get into this file and change something. Running

          ls -ail /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb

          Gives me

          770061 -rw-r--r-- 1 root root 18378290 2008-07-15 17:06 /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb


          But running

          cat /var/cache/apt/archives/linux-image-2.6.24-19-generic_2.6.24-19.36_i386.deb

          just gives me pages of binary

          Any ideas?


          Comment


            #6
            [Solved]: Upgrade problem: Sub-process /usr/bin/dpkg returned an error code (1)

            Eventually I reached a solution to this problem.

            See here

            https://answers.launchpad.net/ubuntu/+question/41235

            Many thanks to all who have helped - other users are the reason I use Linux.

            Comment

            Working...
            X