Announcement

Collapse
No announcement yet.

cannot 'apt upgrade' after install of 16.04.1

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

    cannot 'apt upgrade' after install of 16.04.1

    On making a fresh install of 16.04.1, I ran the commands for
    Code:
    [FONT=courier new]sudo apt update
    sudo apt upgrade[/FONT]
    and I get the error as:
    Code:
    [FONT=courier new]Preparing to unpack .../libc6_2.23-0ubuntu5_amd64.deb ...
    
    LD_LIBRARY_PATH contains the traditional /lib directory,
    but not the multiarch directory /lib/x86_64-linux-gnu.
    It is not safe to upgrade the C library in this situation;
    please remove the /lib/directory from LD_LIBRARY_PATH and
    try again.
    
    dpkg: error processing archive /var/cache/apt/archives/libc6_2.23-0ubuntu5_amd64.deb (--unpack):
    subprocess new pre-installation script returned error exit status 1
    Processing triggers for libc-bin (2.23-0ubuntu5) ...
    Errors were encountered while processing:
    /var/cache/apt/archives/libc6_2.23-0ubuntu5_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    kenzo@kenzo-Latitude-3460:~$
    [/FONT]
    I checked the
    Code:
    LD_LIBRARY_PATH
    and this is the output:
    Code:
    kenzo@kenzo-Latitude-3460:~$ echo $LD_LIBRARY_PATH
    
    kenzo@kenzo-Latitude-3460:~$
    Last edited by Guest; Feb 02, 2017, 11:40 PM. Reason: added more info

    #2
    Solved.

    I installed the other packages apart from libc which came in the list of upgradeable packages, rebooted my computer and it worked fine.

    The problem could be replicated by reinstalling a fresh copy of kubuntu 16.04.1 and running apt update and apt upgrade. The three packages libc-dev, libc-dbg and libc upgrades itself, but falls into a loop of dependence issues as the libc-dev depends on the latest version of libc. Unfortunately, the latter doesn't get installed first. I removed the libc-dev and libc-dbg using the command:

    sudo dpkg --purge --force-depends "libc6-dev"
    sudo dpkg --purge --force-depends "libc6-dbg"

    I could then install 'libc-bin', on which 'libc' depends on.

    and then was able to run 'apt -f install' without errors. Although I still couldn't run the 'apt upgrade'. I then installed the individual packages listed to upgrade, explicitly removing libc from the list. After this, I rebooted and then I didn't get the error anymore.

    Comment


      #3
      IF using apt (as opposed to apt-get), do yourself a huge favor and stop using apt upgrade; use apt full-upgrade instead. Your system will remain much more stable, as the full-upgrade option handles package dependencies intelligently, adding or removing packages as required to keep your system fully up to date; the upgrade option doesn't, and can leave your system in a broken state.

      Open a konsole and type man apt and read all about it.
      Using Kubuntu Linux since March 23, 2007
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment

      Working...
      X