Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Broken Packages, Unmet Dependencies

  1. #1
    Join Date
    Jun 2016
    Beans
    23

    Broken Packages, Unmet Dependencies

    Greetings,
    This laptop has a dual boot OS pair in which I have been using 16.04 LTS for several years
    I am trying to fix a reinstall from a live CD of 16.04 that was a response to a highly unsuccessful upgrade to 18.04 .
    I have followed the suggestions and re-tried several times to correct the "packages have unmet dependencies" that the telltale "no-entry" symbol mouse over reveals.

    Software Updater: ..."package system broken"

    Code:
    apt-get install -f : 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following additional packages will be installed:
      cpp-5
    Suggested packages:
      gcc-5-locales
    The following packages will be upgraded:
      cpp-5
    1 upgraded, 0 newly installed, 0 to remove and 536 not upgraded.
    2 not fully installed or removed.
    Need to get 0 B/7,660 kB of archives.
    After this operation, 16.4 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 210734 files and directories currently installed.)
    Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
    Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.11) over (5.4.0-6ubuntu1~16.04.4) ...
    dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
    dpkg-deb: error: subprocess <decompress> returned error exit status 2
    dpkg: error processing archive /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb (--unpack):
     cannot copy extracted data for './usr/lib/gcc/x86_64-linux-gnu/5/cc1' to '/usr/lib/gcc/x86_64-linux-gnu/5/cc1.dpkg-new': unexpected end of file or stream
    Errors were encountered while processing:
     /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Following an 8-13-19 suggestion by Impavidus and ignoring a huge amount of output,
    the gcc-5 part:
    Code:
    dpkg --list | egrep -v ^ii\|^rc
    ii  gcc                                        4:5.3.1-1ubuntu1                              amd64        GNU C compiler
    iU  gcc-5                                      5.4.0-6ubuntu1~16.04.11                       amd64        GNU C compilerii  gcc-5-base:amd64                           5.4.0-6ubuntu1~16.04.11                       amd64        GCC, the GNU Compiler Collection (base package)
    and the cpp-5 part:
    Code:
    ii  cpp                                        4:5.3.1-1ubuntu1                              amd64        GNU C preprocessor (cpp)
    ii  cpp-5                                      5.4.0-6ubuntu1~16.04.4                        amd64        GNU C preprocessor
    With the huge amount of information from Impavidus' code suggestion, and for the sake of a shorter post, I have not tried the:
    Code:
    dpkg --list | grep linux-
    df -h
    I have tried several other attempts that topic related forum postings have suggested and have not resolved the problem.

    And to complicate the search of the forums, Firefox crashes unexpectedly.
    I have been opening up earlier versions of Ubuntu from Grub and that allows Firefox to run without interruption.

    Please advise.

  2. #2
    Join Date
    Mar 2007
    Beans
    1,325

    Re: Broken Packages, Unmet Dependencies

    You could try:

    Code:
    sudo apt install --reinstall cpp-5
    That should download the package and reinstall it.
    Many examples show the --reinstall before the install first but I don't think it makes any difference.
    Last edited by rsteinmetz70112; October 13th, 2019 at 08:04 AM.

  3. #3
    Join Date
    Jun 2016
    Beans
    23

    Re: Broken Packages, Unmet Dependencies

    Firstly, Thank You for responding to my request for help.

    The "sudo apt install --reinstall cpp-5" returns:
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Suggested packages:
      gcc-5-locales
    The following packages will be upgraded:
      cpp-5
    1 upgraded, 0 newly installed, 0 to remove and 536 not upgraded.
    2 not fully installed or removed.
    Need to get 0 B/7,660 kB of archives.
    After this operation, 16.4 kB of additional disk space will be used.
    (Reading database ... 210734 files and directories currently installed.)
    Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
    Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.11) over (5.4.0-6ubuntu1~16.04.4) ...
    dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
    dpkg-deb: error: subprocess <decompress> returned error exit status 2
    dpkg: error processing archive /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb (--unpack):
     cannot copy extracted data for './usr/lib/gcc/x86_64-linux-gnu/5/cc1' to '/usr/lib/gcc/x86_64-linux-gnu/5/cc1.dpkg-new': unexpected end of file or stream
    Errors were encountered while processing:
     /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    In case the item "1 upgraded" from the output was a positive step, I tried:
    "sudo apt install --reinstall gcc-5"
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     cpp-5 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.4) but 5.4.0-6ubuntu1~16.04.11 is to be installed
     gcc-5 : Depends: cpp-5 (= 5.4.0-6ubuntu1~16.04.11) but 5.4.0-6ubuntu1~16.04.4 is to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    Please note that I have previously tried the 'sudo apt-get -f install' approach without success.
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following additional packages will be installed:
      cpp-5
    Suggested packages:
      gcc-5-locales
    The following packages will be upgraded:
      cpp-5
    1 upgraded, 0 newly installed, 0 to remove and 536 not upgraded.
    2 not fully installed or removed.
    Need to get 0 B/7,660 kB of archives.
    After this operation, 16.4 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 210734 files and directories currently installed.)
    Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
    Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.11) over (5.4.0-6ubuntu1~16.04.4) ...
    dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
    dpkg-deb: error: subprocess <decompress> returned error exit status 2
    dpkg: error processing archive /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb (--unpack):
     cannot copy extracted data for './usr/lib/gcc/x86_64-linux-gnu/5/cc1' to '/usr/lib/gcc/x86_64-linux-gnu/5/cc1.dpkg-new': unexpected end of file or stream
    Errors were encountered while processing:
     /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    From the second batch of output:
    Code:
    cpp-5 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.4) but 5.4.0-6ubuntu1~16.04.11 is to be installed
     gcc-5 : Depends: cpp-5 (= 5.4.0-6ubuntu1~16.04.11) but 5.4.0-6ubuntu1~16.04.4 is to be installed
    Is there a problem between the xx.xx.11 and xx.xx.4 versions of Ubuntu?
    This 16.04 version in question is on a disc that I previously used without problem to do a fresh install on an i7 desktop. So, I feel that the source material is uncorrupted.
    At this point, is this a core issue or an unnecessary detour?

  4. #4
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,822
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Broken Packages, Unmet Dependencies

    Quote Originally Posted by C.Snyder View Post
    Firstly, Thank You for responding to my request for help.

    The "sudo apt install --reinstall cpp-5" returns:
    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Suggested packages:
      gcc-5-locales
    The following packages will be upgraded:
      cpp-5
    1 upgraded, 0 newly installed, 0 to remove and 536 not upgraded.
    2 not fully installed or removed.
    Need to get 0 B/7,660 kB of archives.
    After this operation, 16.4 kB of additional disk space will be used.
    (Reading database ... 210734 files and directories currently installed.)
    Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
    Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.11) over (5.4.0-6ubuntu1~16.04.4) ...
    dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
    dpkg-deb: error: subprocess <decompress> returned error exit status 2
    dpkg: error processing archive /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb (--unpack):
     cannot copy extracted data for './usr/lib/gcc/x86_64-linux-gnu/5/cc1' to '/usr/lib/gcc/x86_64-linux-gnu/5/cc1.dpkg-new': unexpected end of file or stream
    Errors were encountered while processing:
     /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    It doesn't look like it redownloaded the package. Try to delete the archive first:
    Code:
    sudo rm /var/cache/apt/archives/cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb
    Deleting random files from cache directories is usually safe.

  5. #5
    Join Date
    Jun 2016
    Beans
    23

    Re: Broken Packages, Unmet Dependencies

    Impavidus,

    Ran the remove code you posted and saw some action.
    The results:
    Code:
    ......
    Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.11 [7,660 kB]
    Fetched 7,660 kB in 1min 19s (96.5 kB/s)                                       
    (Reading database ... 210734 files and directories currently installed.)
    Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
    Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.11) over (5.4.0-6ubuntu1~16.04.4) ...
    Processing triggers for man-db (2.7.5-1) ...
    Setting up cpp-5 (5.4.0-6ubuntu1~16.04.11) ...
    Setting up gcc-5 (5.4.0-6ubuntu1~16.04.11) ...
    Setting up g++-5 (5.4.0-6ubuntu1~16.04.11) ...
    The no-entry symbol at the top of the screen is now gone.

    I will reboot to the newest kernel in Grub and see how the system updater evaluates the current configuration.

    Thank you!

  6. #6
    Join Date
    Jun 2016
    Beans
    23

    Re: Broken Packages, Unmet Dependencies

    Update:

    I rebooted, made it into the Software Updater and did download 101 MB of updates.
    The unpacking and installing process got weird, went to a "low graphics mode" and then:
    "/dev/sda6: clean, .23523/21102592 files, 3386074/84407552 blocks"
    with a blinking cursor.

    A hard boot produced the desktop and several pop-up error messages invoking a report to the developers.
    The upper right screen no-entry symbol: (mouse over drop down)
    "Run Package Manager
    Error: Opening Package Manager (E: Problem Parsing dependency Depends,
    E: Error occurred while processing libcdr.-0.1-1 (New Version2),
    E: Problem with MergeList /var/lib/dpkg/status,
    E: The package lists or status file could not be parsed or opened.)'.
    This usually means that your installed packages have unmet dependencies."

    Question:
    Since the cpp-5 and gcc-5 issue has been dealt with, would it be appropriate to mark this thread as "solved" and open a new thread to chase down the MergeList issue?

    Once again my Thanks go to rsteinmetz70112 and Impavidus.

  7. #7
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,822
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Broken Packages, Unmet Dependencies

    It looks like a new issue, but it could be related. If you start a new thread, make sure to link to this thread.

  8. #8
    Join Date
    Mar 2007
    Beans
    1,325

    Re: Broken Packages, Unmet Dependencies

    Did you ever get the 536 not upgradedpackages upgraded?

    I'd first rerun these commands to confirm everything got cleaned up and if the problem you're seeing now still exists.

    Code:
    sudo apt install -f
    sudo dpkg --configure -a
    sudo apt update
    sudo apt upgrade

  9. #9
    Join Date
    Jun 2016
    Beans
    23

    Re: Broken Packages, Unmet Dependencies

    Impavidus,
    Since Feisty Fawn I have spent most of my forum time reading as opposed to posting.
    In the text of posted replies I have seen links used to reference another thread where an issue has already been discussed.
    I do not know how to properly link threads.
    I have noticed the 4th button from the end of this Quick Reply window that does mouse-over identify as "link" but I have yet to see how it behaves.
    Last edited by C.Snyder; October 15th, 2019 at 03:48 AM.

  10. #10
    Join Date
    Jun 2016
    Beans
    23

    Re: Broken Packages, Unmet Dependencies

    rsteinmetz,

    Yes, I was able to run the Package Manager and saw the updates as they were retrieved.
    My connection speeds are very slow so I do other things while the process is running. At the completion of the process there were error messages that I did not record.
    From my notes I did run the sudo apt-get install -f but I did not save that output for posting either.

    Please note that I was running Impavidus' suggested code while booted up to an earlier kernel but did the 536 updates in a newer kernel.
    I do not know if this is significant or not.

    Here is the results of the sudo apt install -f:
    Code:
    Reading package lists... Error!
    E: Problem parsing dependency Depends
    E: Error occurred while processing libcdr-0.1-1 (NewVersion2)
    E: Problem with MergeList /var/lib/dpkg/status
    E: The package lists or status file could not be parsed or opened.
    The sudo dpkg --configure -a:
    Code:
    dpkg: error: parsing file '/var/lib/dpkg/status' near line 28511 package 'libcdr-0.1-1:amd64':
     'Depends' field, reference to 'zlib1g': error in version: epoch in version is not number
    The sudo apt update
    generated a bunch of stuff and this is the last of the output:
    Code:
    Reading package lists... Error!                                                
    E: The repository 'cdrom://Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801) xenial Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: Problem parsing dependency Depends
    E: Error occurred while processing libcdr-0.1-1 (NewVersion2)
    E: Problem with MergeList /var/lib/dpkg/status
    E: The package lists or status file could not be parsed or opened.
    I have yet to try the "apt upgrade" because there are obviously some remaining issues.
    Question:
    Will the "upgrade" only operate on the 16.04 version and not reach for 16.10 or beyond?
    And as I have already mentioned, an attempted upgrade to 18.04 did not go well.

Page 1 of 3 123 LastLast

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
  •